Browse Source

PV46. Minor protocol alterations.

cl-refactor
Gav Wood 10 years ago
parent
commit
8cbea38df9
  1. 2
      libdevcore/Common.cpp
  2. 2
      libethcore/CommonEth.cpp
  3. 2
      libethereum/MessageFilter.cpp
  4. 6
      libevm/ExtVMFace.h
  5. 2
      libevmcore/Instruction.h
  6. 2
      test/vm.cpp

2
libdevcore/Common.cpp

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

2
libethcore/CommonEth.cpp

@ -33,7 +33,7 @@ namespace dev
namespace eth
{
const unsigned c_protocolVersion = 45;
const unsigned c_protocolVersion = 46;
const unsigned c_databaseVersion = 5;
static const vector<pair<u256, string>> g_units =

2
libethereum/MessageFilter.cpp

@ -198,7 +198,7 @@ LogEntries LogFilter::matches(TransactionReceipt const& _m) const
if (!m_addresses.empty() && !m_addresses.count(e.address))
continue;
for (auto const& t: m_topics)
if (!e.topics.count(t))
if (!std::count(e.topics.begin(), e.topics.end(), t))
continue;
ret.push_back(e);
}

6
libevm/ExtVMFace.h

@ -49,8 +49,8 @@ using LogBloom = h512;
struct LogEntry
{
LogEntry() {}
LogEntry(RLP const& _r) { address = (Address)_r[0]; topics = (h256Set)_r[1]; data = _r[2].toBytes(); }
LogEntry(Address const& _address, h256s const& _ts, bytes&& _d): address(_address), topics(toSet(_ts)), data(std::move(_d)) {}
LogEntry(RLP const& _r) { address = (Address)_r[0]; topics = (h256s)_r[1]; data = _r[2].toBytes(); }
LogEntry(Address const& _address, h256s const& _ts, bytes&& _d): address(_address), topics(_ts), data(std::move(_d)) {}
void streamRLP(RLPStream& _s) const { _s.appendList(3) << address << topics << data; }
@ -64,7 +64,7 @@ struct LogEntry
}
Address address;
h256Set topics;
h256s topics;
bytes data;
};

2
libevmcore/Instruction.h

@ -168,8 +168,8 @@ enum class Instruction: uint8_t
CREATE = 0xf0, ///< create a new account with associated code
CALL, ///< message-call into an account
CALLCODE, ///< message-call with another account's code only
RETURN, ///< halt execution returning output data
CALLCODE,
SUICIDE = 0xff ///< halt execution and register account for later deletion
};

2
test/vm.cpp

@ -149,7 +149,7 @@ void FakeExtVM::importLog(mObject& _o)
LogEntry log;
log.address = Address(o["address"].get_str());
for (auto const& t: o["topics"].get_array())
log.topics.insert(h256(t.get_str()));
log.topics.push_back(h256(t.get_str()));
log.data = importData(o);
sub.logs.push_back(log);
}

Loading…
Cancel
Save