From fef4ed9f154b169e43571e4d2e2a50efa0a8e105 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 28 Feb 2015 00:32:02 +0100 Subject: [PATCH] Warnings fixes. --- alethzero/MainWin.cpp | 9 +++++++-- libwhisper/WhisperHost.cpp | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 9ee3f36e3..a4c8a7b60 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -1382,11 +1382,16 @@ void Main::on_blocks_currentItemChanged() s << "
Pre: " << BlockInfo(ethereum()->blockChain().block(info.parentHash)).stateRoot << ""; else s << "
Pre: Nothing is before Phil"; + BlockReceipts receipts = ethereum()->blockChain().receipts(h); + unsigned ii = 0; for (auto const& i: block[1]) - s << "
" << sha3(i.data()).abridged();// << ": " << i[1].toHash() << " [" << i[2].toInt() << " used]"; + { + s << "
" << sha3(i.data()).abridged() << ": " << receipts.receipts[ii].stateRoot() << " [" << receipts.receipts[ii].gasUsed() << " used]"; + ++ii; + } s << "
Post: " << info.stateRoot << ""; s << "
Dump: " Span(Mono) << toHex(block[0].data()) << ""; - s << "
Receipts-Hex: " Span(Mono) << toHex(ethereum()->blockChain().receipts(h).rlp()) << "
"; + s << "
Receipts-Hex: " Span(Mono) << toHex(receipts.rlp()) << "
"; } else { diff --git a/libwhisper/WhisperHost.cpp b/libwhisper/WhisperHost.cpp index 22a6a56fe..633eef5b5 100644 --- a/libwhisper/WhisperHost.cpp +++ b/libwhisper/WhisperHost.cpp @@ -58,7 +58,7 @@ void WhisperHost::inject(Envelope const& _m, WhisperPeer* _p) { cnote << this << ": inject: " << _m.expiry() << _m.ttl() << _m.topic() << toHex(_m.data()); - if (_m.expiry() <= time(0)) + if (_m.expiry() <= (unsigned)time(0)) return; auto h = _m.sha3(); @@ -171,7 +171,7 @@ void WhisperHost::cleanup() { // remove old messages. // should be called every now and again. - auto now = time(0); + unsigned now = (unsigned)time(0); WriteGuard l(x_messages); for (auto it = m_expiryQueue.begin(); it != m_expiryQueue.end() && it->first <= now; it = m_expiryQueue.erase(it)) m_messages.erase(it->second);