diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp
index fc27d6e30..4a32f66b2 100644
--- a/alethzero/MainWin.cpp
+++ b/alethzero/MainWin.cpp
@@ -1261,6 +1261,9 @@ void Main::on_blocks_currentItemChanged()
s << "
Gas used/limit: " << info.gasUsed << "/" << info.gasLimit << "";
s << "
Coinbase: " << pretty(info.coinbaseAddress).toHtmlEscaped().toStdString() << " " << info.coinbaseAddress;
s << "
Nonce: " << info.nonce << "";
+ s << "
Hash w/o nonce: " << info.headerHashWithoutNonce() << "";
+ s << "
Difficulty: " << info.difficulty << "";
+ s << "
Proof-of-Work: " << ProofOfWork::eval(info.headerHashWithoutNonce(), info.nonce) << " <= " << (h256)u256((bigint(1) << 256) / info.difficulty) << "";
s << "
Parent: " << info.parentHash << "";
// s << "
Bloom: " << details.bloom << "";
s << "
Log Bloom: " << info.logBloom << "";
@@ -1281,6 +1284,7 @@ void Main::on_blocks_currentItemChanged()
for (auto const& i: block[1])
s << "
" << sha3(i.data()).abridged();// << ": " << i[1].toHash() << " [" << i[2].toInt() << " used]";
s << "
Post: " << info.stateRoot << "";
+ s << "
Dump: " << toHex(block[0].data()) << "";
}
else
{
diff --git a/libdevcore/Common.cpp b/libdevcore/Common.cpp
index 280268d8b..55250b418 100644
--- a/libdevcore/Common.cpp
+++ b/libdevcore/Common.cpp
@@ -27,7 +27,7 @@ using namespace dev;
namespace dev
{
-char const* Version = "0.7.11";
+char const* Version = "0.7.12";
}
diff --git a/libethcore/CommonEth.cpp b/libethcore/CommonEth.cpp
index 010b7e408..744e85a27 100644
--- a/libethcore/CommonEth.cpp
+++ b/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> g_units =
diff --git a/libethereum/MessageFilter.cpp b/libethereum/MessageFilter.cpp
index b04d213f9..0519fe28b 100644
--- a/libethereum/MessageFilter.cpp
+++ b/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);
}
diff --git a/libevm/ExtVMFace.h b/libevm/ExtVMFace.h
index 65761e410..9e6601d0a 100644
--- a/libevm/ExtVMFace.h
+++ b/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;
};
diff --git a/libevmcore/Instruction.h b/libevmcore/Instruction.h
index eb85c0610..f8a0478f1 100644
--- a/libevmcore/Instruction.h
+++ b/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
};
diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp
index b233fe552..cad1b179c 100644
--- a/libp2p/Host.cpp
+++ b/libp2p/Host.cpp
@@ -155,7 +155,7 @@ bi::tcp::endpoint Host::traverseNAT(std::vector const& _ifAddresses
{
asserts(_listenPort != 0);
- UPnP* upnp;
+ UPnP* upnp = nullptr;
try
{
upnp = new UPnP;
diff --git a/libsolidity/Compiler.cpp b/libsolidity/Compiler.cpp
index 988390d0b..17ad4fd16 100644
--- a/libsolidity/Compiler.cpp
+++ b/libsolidity/Compiler.cpp
@@ -324,7 +324,7 @@ bool Compiler::visit(ExpressionStatement& _expressionStatement)
{
Expression& expression = _expressionStatement.getExpression();
ExpressionCompiler::compileExpression(m_context, expression);
- Type::Category category = expression.getType()->getCategory();
+// Type::Category category = expression.getType()->getCategory();
for (unsigned i = 0; i < expression.getType()->getSizeOnStack(); ++i)
m_context << eth::Instruction::POP;
return false;
diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp
index bfdd393d7..e64264748 100644
--- a/test/TestHelper.cpp
+++ b/test/TestHelper.cpp
@@ -272,7 +272,7 @@ LogEntries importLog(json_spirit::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);
logEntries.push_back(log);
}
diff --git a/test/vm.cpp b/test/vm.cpp
index 8c9810a2c..d7bc0612a 100644
--- a/test/vm.cpp
+++ b/test/vm.cpp
@@ -120,6 +120,41 @@ void FakeExtVM::importEnv(mObject& _o)
currentBlock.coinbaseAddress = Address(_o["currentCoinbase"].get_str());
}
+mObject FakeExtVM::exportLog()
+{
+ mObject ret;
+ for (LogEntry const& l: sub.logs)
+ {
+ mObject o;
+ o["address"] = toString(l.address);
+ mArray topics;
+ for (auto const& t: l.topics)
+ topics.push_back(toString(t));
+ o["topics"] = topics;
+ o["data"] = "0x" + toHex(l.data);
+ ret[toString(l.bloom())] = o;
+ }
+ return ret;
+}
+
+void FakeExtVM::importLog(mObject& _o)
+{
+ for (auto const& l: _o)
+ {
+ mObject o = l.second.get_obj();
+ // cant use BOOST_REQUIRE, because this function is used outside boost test (createRandomTest)
+ assert(o.count("address") > 0);
+ assert(o.count("topics") > 0);
+ assert(o.count("data") > 0);
+ LogEntry log;
+ log.address = Address(o["address"].get_str());
+ for (auto const& t: o["topics"].get_array())
+ log.topics.push_back(h256(t.get_str()));
+ log.data = importData(o);
+ sub.logs.push_back(log);
+ }
+}
+
mObject FakeExtVM::exportState()
{
mObject ret;
diff --git a/test/vm.h b/test/vm.h
index a52a02e31..fb0346d51 100644
--- a/test/vm.h
+++ b/test/vm.h
@@ -72,6 +72,8 @@ public:
void importExec(json_spirit::mObject& _o);
json_spirit::mArray exportCallCreates();
void importCallCreates(json_spirit::mArray& _callcreates);
+ json_spirit::mObject exportLog();
+ void importLog(json_spirit::mObject& _o);
eth::OnOpFunc simpleTrace();