aboutsummaryrefslogtreecommitdiffstats
path: root/MemTrie.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-10-27 21:13:16 +0800
committerGav Wood <i@gavwood.com>2014-10-27 21:13:16 +0800
commited7a56cc16ad28601d2d6546615a1d1feb5ce527 (patch)
tree08c190587c8203de0a33004ab9f916c72989d080 /MemTrie.cpp
parent08c45c85b49edad8451a03df4a31363f216db97c (diff)
downloaddexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar.gz
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar.bz2
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar.lz
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar.xz
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.tar.zst
dexon-solidity-ed7a56cc16ad28601d2d6546615a1d1feb5ce527.zip
PoC-7: Reversion of 0-hashes, empty-list hashes and sha3('') -> ''
Diffstat (limited to 'MemTrie.cpp')
-rw-r--r--MemTrie.cpp4
1 files changed, 2 insertions, 2 deletions
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()