Browse Source

Make value in AZ transact default to something sensible.

cl-refactor
Gav Wood 10 years ago
parent
commit
38dc97b54c
  1. 2
      alethzero/Transact.cpp
  2. 2
      libethereum/BlockChain.cpp
  3. 4
      libethereum/EthereumPeer.cpp

2
alethzero/Transact.cpp

@ -237,6 +237,8 @@ void Transact::rejigData()
if (!ui->gas->isEnabled()) if (!ui->gas->isEnabled())
ui->gas->setValue(m_backupGas); ui->gas->setValue(m_backupGas);
ui->gas->setEnabled(true); ui->gas->setEnabled(true);
if (ui->gas->value() == ui->gas->minimum())
ui->gas->setValue((int)(m_ethereum->postState().gasLimitRemaining() / 10));
} }
else else
{ {

2
libethereum/BlockChain.cpp

@ -431,9 +431,7 @@ h256s BlockChain::treeRoute(h256 _from, h256 _to, h256* o_common, bool _pre, boo
{ {
// cdebug << "treeRoute" << _from.abridged() << "..." << _to.abridged(); // cdebug << "treeRoute" << _from.abridged() << "..." << _to.abridged();
if (!_from || !_to) if (!_from || !_to)
{
return h256s(); return h256s();
}
h256s ret; h256s ret;
h256s back; h256s back;
unsigned fn = details(_from).number; unsigned fn = details(_from).number;

4
libethereum/EthereumPeer.cpp

@ -505,6 +505,10 @@ bool EthereumPeer::interpret(unsigned _id, RLP const& _r)
return false; return false;
} }
} }
catch (Exception const& _e)
{
clogS(NetWarn) << "Peer causing an Exception:" << _e.what() << _r;
}
catch (std::exception const& _e) catch (std::exception const& _e)
{ {
clogS(NetWarn) << "Peer causing an exception:" << _e.what() << _r; clogS(NetWarn) << "Peer causing an exception:" << _e.what() << _r;

Loading…
Cancel
Save