Use a node's LeafKey as an identifier instead of the address

It was proving difficult to find look the address up from a given path
with a full node (sometimes the value wouldn't exist in the disk db).
So, instead, for now we are using the node's LeafKey with is a Keccak256
hash of the address, so if we know the address we can figure out which
LeafKey it matches up to.
This commit is contained in:
Elizabeth Engelman 2019-02-07 15:33:42 -06:00 committed by Ian Norden
parent 3b049aeb83
commit 91b5f52ef7
2 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,6 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/trie"
"github.com/ethereum/go-ethereum/core"
)
type Builder interface {

View File

@ -7,6 +7,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/statediff/builder"
"github.com/ethereum/go-ethereum/crypto"
)
func AddressToLeafKey(address common.Address) common.Hash {