diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-12-18 19:40:01 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-12-18 19:40:01 +0800 |
commit | fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b (patch) | |
tree | 4d383884e36cf921bdfcfab40235488a60d2729c /trie/errors.go | |
parent | 2baf1de00df56dee47161ad763788a92693b9c29 (diff) | |
parent | ef422ee1e1eef831c681aaec31ce7da23b12ae6d (diff) | |
download | dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar.gz dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar.bz2 dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar.lz dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar.xz dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.tar.zst dexon-fd69d2b7a87d9f00854e7d8939a6b3ab53cf8c9b.zip |
Merge pull request #2019 from zsfelfoldi/light-state
Light state
Diffstat (limited to 'trie/errors.go')
-rw-r--r-- | trie/errors.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/trie/errors.go b/trie/errors.go index a0f58f28f..fd0e6f0a9 100644 --- a/trie/errors.go +++ b/trie/errors.go @@ -27,13 +27,23 @@ import ( // information necessary for retrieving the missing node through an ODR service. // // NodeHash is the hash of the missing node +// // RootHash is the original root of the trie that contains the node -// KeyPrefix is the prefix that leads from the root to the missing node (hex encoded) -// KeySuffix (optional) contains the rest of the key we were looking for, gives a -// hint on which further nodes should also be retrieved (hex encoded) +// +// Key is a binary-encoded key that contains the prefix that leads to the first +// missing node and optionally a suffix that hints on which further nodes should +// also be retrieved +// +// PrefixLen is the nibble length of the key prefix that leads from the root to +// the missing node +// +// SuffixLen is the nibble length of the remaining part of the key that hints on +// which further nodes should also be retrieved (can be zero when there are no +// such hints in the error message) type MissingNodeError struct { RootHash, NodeHash common.Hash - KeyPrefix, KeySuffix []byte + Key []byte + PrefixLen, SuffixLen int } func (err *MissingNodeError) Error() string { |