diff --git a/libdevcore/Common.cpp b/libdevcore/Common.cpp index bc903b52d..551b7af87 100644 --- a/libdevcore/Common.cpp +++ b/libdevcore/Common.cpp @@ -27,7 +27,7 @@ using namespace dev; namespace dev { -char const* Version = "0.6.10"; +char const* Version = "0.6.11"; } diff --git a/libethcore/CommonEth.cpp b/libethcore/CommonEth.cpp index eed8b4bb9..44297e0ba 100644 --- a/libethcore/CommonEth.cpp +++ b/libethcore/CommonEth.cpp @@ -35,7 +35,7 @@ namespace eth { const unsigned c_protocolVersion = 33; -const unsigned c_databaseVersion = 1; +const unsigned c_databaseVersion = 2; static const vector> g_units = { diff --git a/libethereum/EthereumHost.cpp b/libethereum/EthereumHost.cpp index eea3fd5af..317ad3909 100644 --- a/libethereum/EthereumHost.cpp +++ b/libethereum/EthereumHost.cpp @@ -266,7 +266,11 @@ void EthereumHost::maintainBlocks(BlockQueue& _bq, h256 _currentHash) } clog(NetMessageSummary) << "Sending" << c << "new blocks (current is" << _currentHash << ", was" << m_latestBlockSent << ")"; if (c > 1000) - cwarn << "Gaa sending an awful lot of new blocks. Sure this is right?"; + { + cwarn << "Gaa this would be an awful lot of new blocks. Not bothering"; + return; + } + ts.appendList(1 + c).append(BlocksPacket).appendRaw(bs, c); bytes b; ts.swapOut(b); diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index a6b57a05c..33dc7cb87 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -131,11 +131,9 @@ bool Executive::create(Address _sender, u256 _endowment, u256 _gasPrice, u256 _g // We can allow for the reverted state (i.e. that with which m_ext is constructed) to contain the m_newAddress, since // we delete it explicitly if we decide we need to revert. m_newAddress = right160(sha3(rlpList(_sender, m_s.transactionsFrom(_sender) - 1))); - while (m_s.addressInUse(m_newAddress)) - m_newAddress = (u160)m_newAddress + 1; // Set up new account... - m_s.m_cache[m_newAddress] = AddressState(0, _endowment, h256(), h256()); + m_s.m_cache[m_newAddress] = AddressState(0, m_s.balance(m_newAddress) + _endowment, h256(), h256()); // Execute _init. m_vm = new VM(_gas); diff --git a/libethereum/State.cpp b/libethereum/State.cpp index 8fa6141a5..362e2c94c 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -1133,7 +1133,7 @@ h160 State::create(Address _sender, u256 _endowment, u256 _gasPrice, u256* _gas, newAddress = (u160)newAddress + 1; // Set up new account... - m_cache[newAddress] = AddressState(0, _endowment, h256(), h256()); + m_cache[newAddress] = AddressState(0, balance(newAddress) + _endowment, h256(), h256()); // Execute init code. VM vm(*_gas);