Skip to content

Commit d581746

Browse files
authored
fix: reset block number in chain iterator on rollback (#569)
Signed-off-by: Aurora Gaffney <[email protected]>
1 parent 16ebc3e commit d581746

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

state/chain.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func (ci *ChainIterator) Next(blocking bool) (*ChainIteratorResult, error) {
9494
if ci.blockNumber > 0 && ci.blockNumber-1 > tip.BlockNumber {
9595
ret.Point = tip.Point
9696
ret.Rollback = true
97+
ci.blockNumber = tip.BlockNumber + 1
9798
ci.ls.RUnlock()
9899
return ret, nil
99100
}

0 commit comments

Comments
 (0)