From a36635240c5cc34520872bff42af8356eb03f02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 29 Oct 2014 20:03:32 +0100 Subject: [PATCH 1/3] Update astyle options: - "delete-empty-lines" removed as it removes single empty lines also - "keep-one-line-blocks" added to keep one-line inline methods implementations - "close-templates" added - places template angle bracket together --- astylerc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/astylerc b/astylerc index 0b407b9fe..d4e1188eb 100644 --- a/astylerc +++ b/astylerc @@ -6,6 +6,6 @@ min-conditional-indent=1 pad-oper pad-header unpad-paren -delete-empty-lines align-pointer=type - +keep-one-line-blocks +close-templates From 37fc024c0b2b98bf3fcebaf0597e75f8f1d6bd40 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 29 Oct 2014 21:48:02 +0100 Subject: [PATCH 2/3] Paranoia mode fixed for the new trie format. --- libethereum/State.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethereum/State.cpp b/libethereum/State.cpp index e823a95a7..183b2b8de 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1089,7 +1089,7 @@ bool State::isTrieGood(bool _enforceRefs, bool _requireNoLeftOvers) const RLP r(i.second); TrieDB storageDB(const_cast(&m_db), r[2].toHash()); // promise not to alter OverlayDB. for (auto const& j: storageDB) { (void)j; } - if (!e && r[3].toHash() && m_db.lookup(r[3].toHash()).empty()) + if (!e && r[3].toHash() != EmptySHA3 && m_db.lookup(r[3].toHash()).empty()) return false; } } From 9faa42dfdad56994bb43fb418209f2003f63d55e Mon Sep 17 00:00:00 2001 From: subtly Date: Thu, 30 Oct 2014 02:27:33 +0100 Subject: [PATCH 3/3] h256 to EmtpryTrie when creating contract --- libethereum/Executive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index 5a983b66e..8f52b4c36 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -138,7 +138,7 @@ bool Executive::create(Address _sender, u256 _endowment, u256 _gasPrice, u256 _g m_newAddress = right160(sha3(rlpList(_sender, m_s.transactionsFrom(_sender) - 1))); // Set up new account... - m_s.m_cache[m_newAddress] = AddressState(0, m_s.balance(m_newAddress) + _endowment, h256(), h256()); + m_s.m_cache[m_newAddress] = AddressState(0, m_s.balance(m_newAddress) + _endowment, EmptyTrie, h256()); // Execute _init. m_vm = new VM(_gas);