From 9a7a8aa2ef8cec67223f25463336c60b05d405fd Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 8 May 2014 22:29:12 +0100 Subject: [PATCH] Fix for normal-normal txs. --- alethzero/MainWin.cpp | 3 ++- libethereum/State.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index dbf517405..baec6f938 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -367,7 +367,8 @@ void Main::readSettings() for (unsigned i = 0; i < b.size() / sizeof(Secret); ++i) { memcpy(&k, b.data() + i * sizeof(Secret), sizeof(Secret)); - m_myKeys.append(KeyPair(k)); + if (!count(m_myKeys.begin(), m_myKeys.end(), KeyPair(k))) + m_myKeys.append(KeyPair(k)); } } m_client->setAddress(m_myKeys.back().address()); diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 392780bd9..76f5be020 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -867,7 +867,7 @@ u256 State::execute(bytesConstRef _rlp) commit(); if (e.t().receiveAddress) - assert(m_db.lookup(storageRoot(e.t().receiveAddress), true).size()); + assert(!storageRoot(e.t().receiveAddress) || m_db.lookup(storageRoot(e.t().receiveAddress), true).size()); cnote << "Executed; now" << rootHash(); cnote << old.diff(*this);