Browse Source

No address increment on clash.

cl-refactor
Gav Wood 10 years ago
parent
commit
73d029180c
  1. 2
      libdevcore/Common.cpp
  2. 2
      libethcore/CommonEth.cpp
  3. 6
      libethereum/EthereumHost.cpp
  4. 4
      libethereum/Executive.cpp
  5. 2
      libethereum/State.cpp

2
libdevcore/Common.cpp

@ -27,7 +27,7 @@ using namespace dev;
namespace dev namespace dev
{ {
char const* Version = "0.6.10"; char const* Version = "0.6.11";
} }

2
libethcore/CommonEth.cpp

@ -35,7 +35,7 @@ namespace eth
{ {
const unsigned c_protocolVersion = 33; const unsigned c_protocolVersion = 33;
const unsigned c_databaseVersion = 1; const unsigned c_databaseVersion = 2;
static const vector<pair<u256, string>> g_units = static const vector<pair<u256, string>> g_units =
{ {

6
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 << ")"; clog(NetMessageSummary) << "Sending" << c << "new blocks (current is" << _currentHash << ", was" << m_latestBlockSent << ")";
if (c > 1000) 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); ts.appendList(1 + c).append(BlocksPacket).appendRaw(bs, c);
bytes b; bytes b;
ts.swapOut(b); ts.swapOut(b);

4
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 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. // we delete it explicitly if we decide we need to revert.
m_newAddress = right160(sha3(rlpList(_sender, m_s.transactionsFrom(_sender) - 1))); 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... // 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. // Execute _init.
m_vm = new VM(_gas); m_vm = new VM(_gas);

2
libethereum/State.cpp

@ -1133,7 +1133,7 @@ h160 State::create(Address _sender, u256 _endowment, u256 _gasPrice, u256* _gas,
newAddress = (u160)newAddress + 1; newAddress = (u160)newAddress + 1;
// Set up new account... // 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. // Execute init code.
VM vm(*_gas); VM vm(*_gas);

Loading…
Cancel
Save