aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorSimon Jentzsch <simon@slock.it>2018-10-19 03:41:22 +0800
committerMartin Holst Swende <martin@swende.se>2018-10-19 03:41:22 +0800
commit97fb08342d227bbd126516083b0ddaf74e6e8468 (patch)
treeb47c7d9d8b6c1f7afdf2767d1099265a39a5fce0 /core/vm
parentcdf5982cfca2cd7d5fea85c226af5e48fde837df (diff)
downloaddexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.gz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.bz2
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.lz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.xz
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.tar.zst
dexon-97fb08342d227bbd126516083b0ddaf74e6e8468.zip
EIP-1186 eth_getProof (#17737)
* first impl of eth_getProof * fixed docu * added comments and refactored based on comments from holiman * created structs * handle errors correctly * change Value to *hexutil.Big in order to have the same output as parity * use ProofList as return type
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/interface.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/vm/interface.go b/core/vm/interface.go
index fc15082f1..1ae98cf7a 100644
--- a/core/vm/interface.go
+++ b/core/vm/interface.go
@@ -35,6 +35,8 @@ type StateDB interface {
SetNonce(common.Address, uint64)
GetCodeHash(common.Address) common.Hash
+ GetProof(common.Address) (ProofList, error)
+ GetStorageProof(common.Address, common.Hash) (ProofList, error)
GetCode(common.Address) []byte
SetCode(common.Address, []byte)
GetCodeSize(common.Address) int
@@ -78,3 +80,11 @@ type CallContext interface {
// Create a new contract
Create(env *EVM, me ContractRef, data []byte, gas, value *big.Int) ([]byte, common.Address, error)
}
+
+// MerkleProof
+type ProofList [][]byte
+
+func (n *ProofList) Put(key []byte, value []byte) error {
+ *n = append(*n, value)
+ return nil
+}