mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
Keep nonce and balance in write list even if the transaction is reverted (#889)
An address's nonce and balance will get updated even if its transaction is reverted. Therefore, we need to keep balance and nonce in write list in order to check the transaction's validity in parallel execution.
This commit is contained in:
parent
f1c8226839
commit
3d30c341c4
1 changed files with 0 additions and 3 deletions
|
|
@ -169,7 +169,6 @@ func (ch suicideChange) revert(s *StateDB) {
|
|||
obj.suicided = ch.prev
|
||||
obj.setBalance(ch.prevbalance)
|
||||
RevertWrite(s, blockstm.NewSubpathKey(*ch.account, SuicidePath))
|
||||
RevertWrite(s, blockstm.NewSubpathKey(*ch.account, BalancePath))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +187,6 @@ func (ch touchChange) dirtied() *common.Address {
|
|||
|
||||
func (ch balanceChange) revert(s *StateDB) {
|
||||
s.getStateObject(*ch.account).setBalance(ch.prev)
|
||||
RevertWrite(s, blockstm.NewSubpathKey(*ch.account, BalancePath))
|
||||
}
|
||||
|
||||
func (ch balanceChange) dirtied() *common.Address {
|
||||
|
|
@ -197,7 +195,6 @@ func (ch balanceChange) dirtied() *common.Address {
|
|||
|
||||
func (ch nonceChange) revert(s *StateDB) {
|
||||
s.getStateObject(*ch.account).setNonce(ch.prev)
|
||||
RevertWrite(s, blockstm.NewSubpathKey(*ch.account, NoncePath))
|
||||
}
|
||||
|
||||
func (ch nonceChange) dirtied() *common.Address {
|
||||
|
|
|
|||
Loading…
Reference in a new issue