@@ -968,11 +968,11 @@ func (api *BlockChainAPI) GetBlockReceipts(ctx context.Context, blockNrOrHash rp
968
968
// if stateDiff is set, all diff will be applied first and then execute the call
969
969
// message.
970
970
type 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"`
976
976
}
977
977
978
978
// StateOverride is the collection of overridden accounts.
@@ -994,19 +994,19 @@ func (diff *StateOverride) Apply(statedb *state.StateDB) error {
994
994
}
995
995
// Override account balance.
996
996
if account .Balance != nil {
997
- u256Balance , _ := uint256 .FromBig ((* big .Int )(* account .Balance ))
997
+ u256Balance , _ := uint256 .FromBig ((* big .Int )(account .Balance ))
998
998
statedb .SetBalance (addr , u256Balance , tracing .BalanceChangeUnspecified )
999
999
}
1000
1000
if account .State != nil && account .StateDiff != nil {
1001
1001
return fmt .Errorf ("account %s has both 'state' and 'stateDiff'" , addr .Hex ())
1002
1002
}
1003
1003
// Replace entire state if caller requires.
1004
1004
if account .State != nil {
1005
- statedb .SetStorage (addr , * account .State )
1005
+ statedb .SetStorage (addr , account .State )
1006
1006
}
1007
1007
// Apply state diff into specified accounts.
1008
1008
if account .StateDiff != nil {
1009
- for key , value := range * account .StateDiff {
1009
+ for key , value := range account .StateDiff {
1010
1010
statedb .SetState (addr , key , value )
1011
1011
}
1012
1012
}
0 commit comments