From ed7a56cc16ad28601d2d6546615a1d1feb5ce527 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Mon, 27 Oct 2014 14:13:16 +0100 Subject: PoC-7: Reversion of 0-hashes, empty-list hashes and sha3('') -> '' --- MemTrie.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MemTrie.cpp') diff --git a/MemTrie.cpp b/MemTrie.cpp index 4879f267..c3a44e1e 100644 --- a/MemTrie.cpp +++ b/MemTrie.cpp @@ -437,12 +437,12 @@ MemTrie::~MemTrie() h256 MemTrie::hash256() const { - return m_root ? m_root->hash256() : h256(); + return m_root ? m_root->hash256() : sha3(dev::rlp(bytesConstRef())); } bytes MemTrie::rlp() const { - return m_root ? m_root->rlp() : bytes(); + return m_root ? m_root->rlp() : dev::rlp(bytesConstRef()); } void MemTrie::debugPrint() -- cgit v1.2.3