Skip to content

Commit

Permalink
add unfiltered to enum
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshvanahalli committed Nov 26, 2024
1 parent cf0ca28 commit b2541cf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/state/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ func (m *mutation) isDelete() bool {
type arbFiltered int

const (
txFiltered arbFiltered = 1 + iota
unFiltered arbFiltered = iota
txFiltered
blockFiltered
)

Expand Down Expand Up @@ -231,7 +232,7 @@ func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error)
}

func (s *StateDB) FilterTx(withBlock bool) {
if s.arbTxFilter == 0 {
if s.arbTxFilter == unFiltered {
s.arbTxFilter = txFiltered
if withBlock {
s.arbTxFilter = blockFiltered
Expand Down Expand Up @@ -860,7 +861,7 @@ func (s *StateDB) RevertToSnapshot(revid int) {
snapshot := revision.journalIndex
s.arbExtraData.unexpectedBalanceDelta = new(big.Int).Set(revision.unexpectedBalanceDelta)
if s.arbTxFilter == txFiltered {
s.arbTxFilter = 0
s.arbTxFilter = unFiltered
}

// Replay the journal to undo changes and remove invalidated snapshots
Expand Down

0 comments on commit b2541cf

Please sign in to comment.