change Value to *hexutil.Big in order to have the same output as parity

This commit is contained in:
Simon Jentzsch 2018-10-18 14:06:16 +02:00
parent e51f274f42
commit 17ac3721f2

View file

@ -514,7 +514,7 @@ type AccountResult struct {
}
type StorageResult struct {
Key string `json:"key"`
Value common.Hash `json:"value"`
Value *hexutil.Big `json:"value"`
Proof []string `json:"proof"`
}
@ -545,9 +545,9 @@ func (s *PublicBlockChainAPI) GetProof(ctx context.Context, address common.Addre
if storageError != nil {
return nil, storageError
}
storageProof[i] = StorageResult{key, state.GetState(address, common.HexToHash(key)), common.ToHexArray(proof)}
storageProof[i] = StorageResult{key, (*hexutil.Big)(state.GetState(address, common.HexToHash(key)).Big()), common.ToHexArray(proof)}
} else {
storageProof[i] = StorageResult{key, common.Hash{}, []string{}}
storageProof[i] = StorageResult{key, &hexutil.Big{}, []string{}}
}
}