Skip to content

Commit 313432e

Browse files
address PR comments
1 parent 6205f5e commit 313432e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

core/state/statedb.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ type revision struct {
5151

5252
// Arbitrum: track the total balance change across all accounts
5353
unexpectedBalanceDelta *big.Int
54-
arbTxFilter bool
5554
}
5655

5756
type mutationType int
@@ -224,6 +223,10 @@ func (s *StateDB) FilterTx() {
224223
s.arbExtraData.arbTxFilter = true
225224
}
226225

226+
func (s *StateDB) ClearTxFilter() {
227+
s.arbExtraData.arbTxFilter = false
228+
}
229+
227230
func (s *StateDB) IsTxFiltered() bool {
228231
return s.arbExtraData.arbTxFilter
229232
}
@@ -829,7 +832,7 @@ func (s *StateDB) Copy() *StateDB {
829832
func (s *StateDB) Snapshot() int {
830833
id := s.nextRevisionId
831834
s.nextRevisionId++
832-
s.validRevisions = append(s.validRevisions, revision{id, s.journal.length(), new(big.Int).Set(s.arbExtraData.unexpectedBalanceDelta), s.arbExtraData.arbTxFilter})
835+
s.validRevisions = append(s.validRevisions, revision{id, s.journal.length(), new(big.Int).Set(s.arbExtraData.unexpectedBalanceDelta)})
833836
return id
834837
}
835838

@@ -845,7 +848,6 @@ func (s *StateDB) RevertToSnapshot(revid int) {
845848
revision := s.validRevisions[idx]
846849
snapshot := revision.journalIndex
847850
s.arbExtraData.unexpectedBalanceDelta = new(big.Int).Set(revision.unexpectedBalanceDelta)
848-
s.arbExtraData.arbTxFilter = revision.arbTxFilter
849851

850852
// Replay the journal to undo changes and remove invalidated snapshots
851853
s.journal.revert(s, snapshot)

core/vm/interface.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type StateDB interface {
5050

5151
// Arbitrum
5252
FilterTx()
53+
ClearTxFilter()
5354
IsTxFiltered() bool
5455

5556
Deterministic() bool

0 commit comments

Comments
 (0)