Browse Source

No implicit logs.

cl-refactor
Gav Wood 10 years ago
parent
commit
8580479d88
  1. 9
      alethzero/MainWin.cpp
  2. 2
      alethzero/MainWin.h
  3. 4
      libethereum/Executive.cpp
  4. 13
      libethereum/State.cpp
  5. 2
      libethereum/TransactionReceipt.h

9
alethzero/MainWin.cpp

@ -1238,6 +1238,7 @@ void Main::on_blocks_currentItemChanged()
auto h = h256((byte const*)hba.data(), h256::ConstructFromPointer);
auto details = ethereum()->blockChain().details(h);
auto blockData = ethereum()->blockChain().block(h);
auto blockReceipts = ethereum()->blockChain().receipts(h);
auto block = RLP(blockData);
BlockInfo info(blockData);
@ -1261,6 +1262,14 @@ void Main::on_blocks_currentItemChanged()
s << "<br/>Bloom: <b>" << details.bloom << "</b>";
s << "<br/>Log Bloom: <b>" << info.logBloom << "</b>";
s << "<br/>Transactions: <b>" << block[1].itemCount() << "</b> @<b>" << info.transactionsRoot << "</b>";
s << "<br/>Receipts: @<b>" << info.receiptsRoot << "</b>:";
for (unsigned i = 0; i < blockReceipts.receipts.size(); ++i)
{
s << "<div>TX: " << toHex(block[1][i].data()) << "</div>";
s << "<div>Receipt: " << toHex(blockReceipts.receipts[i].rlp()) << "</div>";
auto r = blockReceipts.receipts[i].rlp();
s << "<div>RLP: " << toString(RLP(r)) << "</div>";
}
s << "<br/>Uncles: <b>" << block[2].itemCount() << "</b> @<b>" << info.sha3Uncles << "</b>";
for (auto u: block[2])
{

2
alethzero/MainWin.h

@ -154,6 +154,7 @@ private slots:
void on_newIdentity_triggered();
void refreshWhisper();
void refreshBlockChain();
void addNewId(QString _ids);
signals:
@ -214,7 +215,6 @@ private:
void refreshPending();
void refreshAccounts();
void refreshDestination();
void refreshBlockChain();
void refreshBlockCount();
void refreshBalances();

4
libethereum/Executive.cpp

@ -123,11 +123,7 @@ bool Executive::call(Address _receiveAddress, Address _senderAddress, u256 _valu
m_ext = new ExtVM(m_s, _receiveAddress, _senderAddress, _originAddress, _value, _gasPrice, _data, &c, m_ms);
}
else
{
m_endGas = _gas;
if (m_ext)
m_ext->sub.logs.push_back(LogEntry(_receiveAddress, {u256((u160)_senderAddress) + 1}, bytes()));
}
return !m_ext;
}

13
libethereum/State.cpp

@ -21,9 +21,10 @@
#include "State.h"
#include <boost/filesystem.hpp>
#include <time.h>
#include <ctime>
#include <random>
#include <boost/filesystem.hpp>
#include <boost/timer.hpp>
#include <secp256k1/secp256k1.h>
#include <libdevcore/CommonIO.h>
#include <libevmcore/Instruction.h>
@ -553,10 +554,12 @@ h256s State::sync(TransactionQueue& _tq, bool* o_transactionQueueChanged)
try
{
uncommitToMine();
// boost::timer t;
execute(i.second);
ret.push_back(m_receipts.back().changes().bloom());
_tq.noteGood(i);
++goodTxs;
// cnote << "TX took:" << t.elapsed() * 1000;
}
catch (InvalidNonce const& in)
{
@ -1242,12 +1245,6 @@ bool State::call(Address _receiveAddress, Address _codeAddress, Address _senderA
return !revert;
}
else
{
// non-contract call
if (o_sub)
o_sub->logs.push_back(LogEntry(_receiveAddress, {u256((u160)_senderAddress) + 1}, bytes()));
}
return true;
}

2
libethereum/TransactionReceipt.h

@ -55,6 +55,8 @@ public:
l.streamRLP(_s);
}
bytes rlp() const { RLPStream s; streamRLP(s); return s.out(); }
private:
h256 m_stateRoot;
u256 m_gasUsed;

Loading…
Cancel
Save