@@ -121,12 +121,6 @@ type StateDB struct {
121121 thash common.Hash
122122 txIndex int
123123
124- // block access list modifications will be recorded with this index.
125- // 0 - state access before transaction execution
126- // 1 -> len(block txs) - state access of each transaction
127- // len(block txs) + 1 - state access after transaction execution.
128- balIndex int
129-
130124 logs map [common.Hash ][]* types.Log
131125 logSize uint
132126
@@ -305,34 +299,6 @@ func (s *StateDB) AddRefund(gas uint64) {
305299 s .refund += gas
306300}
307301
308- // LoadModifiedPrestate instantiates the live object based on accounts
309- // which appeared in the total state diff of a block, and were also preexisting.
310- func (s * StateDB ) LoadModifiedPrestate (addrs []common.Address ) (res map [common.Address ]* types.StateAccount ) {
311- stateAccounts := new (sync.Map )
312- wg := new (sync.WaitGroup )
313- res = make (map [common.Address ]* types.StateAccount )
314-
315- for _ , addr := range addrs {
316- wg .Add (1 )
317- go func (addr common.Address ) {
318- acct , err := s .reader .Account (addr )
319- if err == nil && acct != nil { // TODO: what should we do if the error is not nil?
320- stateAccounts .Store (addr , acct )
321- }
322- wg .Done ()
323- }(addr )
324- }
325- wg .Wait ()
326- stateAccounts .Range (func (addr any , val any ) bool {
327- address := addr .(common.Address )
328- stateAccount := val .(* types.StateAccount )
329- res [address ] = stateAccount
330- return true
331- })
332-
333- return res
334- }
335-
336302// SubRefund removes gas from the refund counter.
337303// This method will panic if the refund counter goes below zero
338304func (s * StateDB ) SubRefund (gas uint64 ) {
@@ -740,7 +706,6 @@ func (s *StateDB) Copy() BlockProcessingDB {
740706 refund : s .refund ,
741707 thash : s .thash ,
742708 txIndex : s .txIndex ,
743- balIndex : s .txIndex ,
744709 logs : make (map [common.Hash ][]* types.Log , len (s .logs )),
745710 logSize : s .logSize ,
746711 preimages : maps .Clone (s .preimages ),
@@ -1098,14 +1063,6 @@ func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
10981063func (s * StateDB ) SetTxContext (thash common.Hash , ti int ) {
10991064 s .thash = thash
11001065 s .txIndex = ti
1101- s .balIndex = ti + 1
1102- }
1103-
1104- // SetAccessListIndex sets the current index that state mutations will
1105- // be reported as in the BAL. It is only relevant if this StateDB instance
1106- // is being used in the BAL construction path.
1107- func (s * StateDB ) SetAccessListIndex (idx int ) {
1108- s .balIndex = idx
11091066}
11101067
11111068func (s * StateDB ) clearJournalAndRefund () {
0 commit comments