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];
else
{
// remove second item from the trie.
s = node(_orig[1].toHash<h256>());
killNode(_orig[1]);
// remove second item from the trie after derefrencing it into s & n.
auto lh = _orig[1].toHash<h256>();
s = node(lh);
killNode(lh);
n = RLP(s);
}
assert(n.itemCount() == 2);

Loading…
Cancel
Save