From 2534628542cbdace2985c91fc7626848bf788001 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Thu, 14 Nov 2024 17:33:24 +0800 Subject: [PATCH] core/state/snapshot: fix test --- core/state/snapshot/iterator.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/state/snapshot/iterator.go b/core/state/snapshot/iterator.go index 55b9175663..cd9c225844 100644 --- a/core/state/snapshot/iterator.go +++ b/core/state/snapshot/iterator.go @@ -115,6 +115,7 @@ func (it *diffAccountIterator) Next() bool { } // Iterator seems to be still alive, retrieve and cache the live hash it.curHash = it.keys[0] + // key cached, shift the iterator and notify the user of success it.keys = it.keys[1:] return true @@ -135,7 +136,7 @@ func (it *diffAccountIterator) Hash() common.Hash { // This method may _fail_, if the underlying layer has been flattened between // the call to Next and Account. That type of error will set it.Err. // This method assumes that flattening does not delete elements from -// the accountdata mapping (writing nil into it is fine though), and will panic +// the accountData mapping (writing nil into it is fine though), and will panic // if elements have been deleted. // // Note the returned account is not a copy, please don't modify it.