@@ -968,11 +968,11 @@ func (api *BlockChainAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rp
968968// if stateDiff is set, all diff will be applied first and then execute the call
969969// message.
970970type OverrideAccount struct {
971- Nonce * hexutil.Uint64 `json:"nonce"`
972- Code * hexutil.Bytes `json:"code"`
973- Balance * * hexutil.Big `json:"balance"`
974- State * map [common.Hash ]common.Hash `json:"state"`
975- StateDiff * map [common.Hash ]common.Hash `json:"stateDiff"`
971+ Nonce * hexutil.Uint64 `json:"nonce"`
972+ Code * hexutil.Bytes `json:"code"`
973+ Balance * hexutil.Big `json:"balance"`
974+ State map [common.Hash ]common.Hash `json:"state"`
975+ StateDiff map [common.Hash ]common.Hash `json:"stateDiff"`
976976}
977977
978978// StateOverride is the collection of overridden accounts.
@@ -994,19 +994,19 @@ func (diff *StateOverride) Apply(statedb *state.StateDB) error {
994994 }
995995 // Override account balance.
996996 if account .Balance != nil {
997- u256Balance , _ := uint256 .FromBig ((* big .Int )(* account .Balance ))
997+ u256Balance , _ := uint256 .FromBig ((* big .Int )(account .Balance ))
998998 statedb .SetBalance (addr , u256Balance , tracing .BalanceChangeUnspecified )
999999 }
10001000 if account .State != nil && account .StateDiff != nil {
10011001 return fmt .Errorf ("account %s has both 'state' and 'stateDiff'" , addr .Hex ())
10021002 }
10031003 // Replace entire state if caller requires.
10041004 if account .State != nil {
1005- statedb .SetStorage (addr , * account .State )
1005+ statedb .SetStorage (addr , account .State )
10061006 }
10071007 // Apply state diff into specified accounts.
10081008 if account .StateDiff != nil {
1009- for key , value := range * account .StateDiff {
1009+ for key , value := range account .StateDiff {
10101010 statedb .SetState (addr , key , value )
10111011 }
10121012 }
0 commit comments