File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
crates/anvil/src/eth/backend/mem Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -127,11 +127,21 @@ impl MaybeFullDatabase for ForkDbStateSnapshot {
127127 }
128128
129129 fn clear_into_state_snapshot ( & mut self ) -> StateSnapshot {
130- std:: mem:: take ( & mut self . state_snapshot )
130+ let mut state_snapshot = std:: mem:: take ( & mut self . state_snapshot ) ;
131+ let local_state_snapshot = self . local . clear_into_state_snapshot ( ) ;
132+ state_snapshot. accounts . extend ( local_state_snapshot. accounts ) ;
133+ state_snapshot. storage . extend ( local_state_snapshot. storage ) ;
134+ state_snapshot. block_hashes . extend ( local_state_snapshot. block_hashes ) ;
135+ state_snapshot
131136 }
132137
133138 fn read_as_state_snapshot ( & self ) -> StateSnapshot {
134- self . state_snapshot . clone ( )
139+ let mut state_snapshot = self . state_snapshot . clone ( ) ;
140+ let local_state_snapshot = self . local . read_as_state_snapshot ( ) ;
141+ state_snapshot. accounts . extend ( local_state_snapshot. accounts ) ;
142+ state_snapshot. storage . extend ( local_state_snapshot. storage ) ;
143+ state_snapshot. block_hashes . extend ( local_state_snapshot. block_hashes ) ;
144+ state_snapshot
135145 }
136146
137147 fn clear ( & mut self ) {
You can’t perform that action at this time.
0 commit comments