From 91b5f52ef7160b8b18df821306ee13daf8c829c4 Mon Sep 17 00:00:00 2001 From: Elizabeth Engelman Date: Thu, 7 Feb 2019 15:33:42 -0600 Subject: [PATCH] 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. --- statediff/builder/builder.go | 1 - statediff/testhelpers/test_data.go | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/statediff/builder/builder.go b/statediff/builder/builder.go index e53b955fd..a106c3ad8 100644 --- a/statediff/builder/builder.go +++ b/statediff/builder/builder.go @@ -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 { diff --git a/statediff/testhelpers/test_data.go b/statediff/testhelpers/test_data.go index 831bed218..f7ae64f5a 100644 --- a/statediff/testhelpers/test_data.go +++ b/statediff/testhelpers/test_data.go @@ -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 {