File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,10 @@ func (dl *diskLayer) revert(h *history) (*diskLayer, error) {
302302 if err != nil {
303303 return nil , err
304304 }
305+ // Derive the state modification set from the history, keyed by the hash
306+ // of the account address and the storage key.
307+ accounts , storages := h .stateSet ()
308+
305309 // Mark the diskLayer as stale before applying any mutations on top.
306310 dl .lock .Lock ()
307311 defer dl .lock .Unlock ()
@@ -314,7 +318,6 @@ func (dl *diskLayer) revert(h *history) (*diskLayer, error) {
314318 // needs to be reverted is not yet flushed and cached in node
315319 // buffer, otherwise, manipulate persistent state directly.
316320 if ! dl .buffer .empty () {
317- accounts , storages := h .stateSet ()
318321 err := dl .buffer .revertTo (dl .db .diskdb , nodes , accounts , storages )
319322 if err != nil {
320323 return nil , err
You can’t perform that action at this time.
0 commit comments