Browse Source

Minor fix for keeping trie clean.

cl-refactor
Gav Wood 11 years ago
parent
commit
8601535da7
  1. 7
      libethereum/TrieDB.h

7
libethereum/TrieDB.h

@ -706,9 +706,10 @@ template <class DB> bytes GenericTrieDB<DB>::graft(RLP const& _orig)
n = _orig[1]; n = _orig[1];
else else
{ {
// remove second item from the trie. // remove second item from the trie after derefrencing it into s & n.
s = node(_orig[1].toHash<h256>()); auto lh = _orig[1].toHash<h256>();
killNode(_orig[1]); s = node(lh);
killNode(lh);
n = RLP(s); n = RLP(s);
} }
assert(n.itemCount() == 2); assert(n.itemCount() == 2);

Loading…
Cancel
Save