Browse Source

Various small improvements.

cl-refactor
Gav Wood 10 years ago
parent
commit
2f9a279e9f
  1. 3
      alethzero/Main.ui
  2. 4
      alethzero/MainWin.cpp
  3. 2
      libethcore/CommonEth.cpp
  4. 4
      libethereum/BlockChain.cpp
  5. 6
      libethereum/State.cpp

3
alethzero/Main.ui

@ -396,6 +396,9 @@
<property name="lineWidth">
<number>0</number>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>

4
alethzero/MainWin.cpp

@ -535,6 +535,7 @@ void Main::writeSettings()
s.setValue("port", ui->port->value());
s.setValue("url", ui->urlEdit->text());
s.setValue("privateChain", m_privateChain);
s.setValue("verbosity", ui->verbosity->value());
bytes d = m_client->savePeers();
if (d.size())
@ -586,6 +587,7 @@ void Main::readSettings(bool _skipGeometry)
ui->nameReg->setText(s.value("nameReg", "").toString());
m_privateChain = s.value("privateChain", "").toString();
ui->usePrivate->setChecked(m_privateChain.size());
ui->verbosity->setValue(s.value("verbosity", 1).toInt());
ui->urlEdit->setText(s.value("url", "about:blank").toString()); //http://gavwood.com/gavcoin.html
on_urlEdit_returnPressed();
@ -928,7 +930,7 @@ void Main::timerEvent(QTimerEvent*)
{
m_logLock.lock();
m_logChanged = false;
ui->log->appendPlainText(m_logHistory);
ui->log->appendPlainText(m_logHistory.mid(0, m_logHistory.length() - 1));
m_logHistory.clear();
m_logLock.unlock();
}

2
libethcore/CommonEth.cpp

@ -29,7 +29,7 @@ using namespace eth;
//#define ETH_ADDRESS_DEBUG 1
const unsigned eth::c_protocolVersion = 29;
const unsigned eth::c_protocolVersion = 28;
const unsigned eth::c_databaseVersion = 1;
static const vector<pair<u256, string>> g_units =

4
libethereum/BlockChain.cpp

@ -247,7 +247,7 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db)
throw FutureTime();
}
clog(BlockChainNote) << "Attempting import of " << newHash << "...";
clog(BlockChainNote) << "Attempting import of " << newHash.abridged() << "...";
u256 td;
#if ETH_CATCH
@ -320,7 +320,7 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db)
m_extrasDB->Put(m_writeOptions, ldb::Slice("best"), ldb::Slice((char const*)&newHash, 32));
clog(BlockChainNote) << " Imported and best. Has" << (details(bi.parentHash).children.size() - 1) << "siblings. Route:";
for (auto r: ret)
clog(BlockChainNote) << r;
clog(BlockChainNote) << r.abridged();
}
else
{

6
libethereum/State.cpp

@ -681,7 +681,7 @@ void State::commitToMine(BlockChain const& _bc)
{
uncommitToMine();
cnote << "Committing to mine on block" << m_previousBlock.hash;
cnote << "Committing to mine on block" << m_previousBlock.hash.abridged();
#ifdef ETH_PARANOIA
commit();
cnote << "Pre-reward stateRoot:" << m_state.root();
@ -739,7 +739,7 @@ void State::commitToMine(BlockChain const& _bc)
// Commit any and all changes to the trie that are in the cache, then update the state root accordingly.
commit();
cnote << "Post-reward stateRoot:" << m_state.root();
cnote << "Post-reward stateRoot:" << m_state.root().abridged();
// cnote << m_state;
// cnote << *this;
@ -778,7 +778,7 @@ void State::completeMine()
ret.appendRaw(m_currentUncles);
ret.swapOut(m_currentBytes);
m_currentBlock.hash = sha3(m_currentBytes);
cnote << "Mined " << m_currentBlock.hash << "(parent: " << m_currentBlock.parentHash << ")";
cnote << "Mined " << m_currentBlock.hash.abridged() << "(parent: " << m_currentBlock.parentHash.abridged() << ")";
// Quickly reset the transactions.
// TODO: Leave this in a better state than this limbo, or at least record that it's in limbo.

Loading…
Cancel
Save