Fix wrong state given to op pool prune
This commit is contained in:
parent
d5d60874e5
commit
24b2f83713
@ -1199,8 +1199,12 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
self.fork_choice
|
||||
.process_finalization(&finalized_block, finalized_block_root)?;
|
||||
|
||||
self.op_pool
|
||||
.prune_all(&self.head().beacon_state, &self.spec);
|
||||
let finalized_state = self
|
||||
.store
|
||||
.get::<BeaconState<T::EthSpec>>(&finalized_block.state_root)?
|
||||
.ok_or_else(|| Error::MissingBeaconState(finalized_block.state_root))?;
|
||||
|
||||
self.op_pool.prune_all(&finalized_state, &self.spec);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user