diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-01 21:38:32 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-04 08:51:36 +0800 |
commit | 0a1ff68c11706f60355b392cb16a681630260ac3 (patch) | |
tree | fa7e46110a346cc1a10e3a3135815942c4560859 /trie/hashnode.go | |
parent | ab16ce70fc68d9ab1b7d8cda57c180b4785cab6a (diff) | |
download | go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar.gz go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar.bz2 go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar.lz go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar.xz go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.tar.zst go-tangerine-0a1ff68c11706f60355b392cb16a681630260ac3.zip |
trie: dirty tracking
Diffstat (limited to 'trie/hashnode.go')
-rw-r--r-- | trie/hashnode.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/trie/hashnode.go b/trie/hashnode.go index 8125cc3c9..e82ab8069 100644 --- a/trie/hashnode.go +++ b/trie/hashnode.go @@ -3,12 +3,13 @@ package trie import "github.com/ethereum/go-ethereum/common" type HashNode struct { - key []byte - trie *Trie + key []byte + trie *Trie + dirty bool } func NewHash(key []byte, trie *Trie) *HashNode { - return &HashNode{key, trie} + return &HashNode{key, trie, false} } func (self *HashNode) RlpData() interface{} { @@ -19,6 +20,10 @@ func (self *HashNode) Hash() interface{} { return self.key } +func (self *HashNode) setDirty(dirty bool) { + self.dirty = dirty +} + // These methods will never be called but we have to satisfy Node interface func (self *HashNode) Value() Node { return nil } func (self *HashNode) Dirty() bool { return true } |