diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp
index 227f739ce..4da7026fe 100644
--- a/alethzero/MainWin.cpp
+++ b/alethzero/MainWin.cpp
@@ -1227,6 +1227,7 @@ void Main::on_blocks_currentItemChanged()
s << "
Nonce: " << info.nonce << "";
s << "
Parent: " << info.parentHash << "";
s << "
Bloom: " << details.bloom << "";
+ s << "
Log Bloom: " << info.logBloom << "";
s << "
Transactions: " << block[1].itemCount() << " @" << info.transactionsRoot << "";
s << "
Uncles: " << block[2].itemCount() << " @" << info.sha3Uncles << "";
if (info.parentHash)
diff --git a/libethcore/BlockInfo.cpp b/libethcore/BlockInfo.cpp
index da609d5b4..ea9cc3055 100644
--- a/libethcore/BlockInfo.cpp
+++ b/libethcore/BlockInfo.cpp
@@ -96,7 +96,7 @@ void BlockInfo::populateFromHeader(RLP const& _header, bool _checkNonce)
nonce = _header[field = 14].toHash();
}
- catch (Exception & _e)
+ catch (Exception const& _e)
{
_e << errinfo_name("invalid block header format") << BadFieldError(field, toHex(_header[field].data().toBytes()));
throw;
diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp
index f63eb64cd..a9bdbf247 100644
--- a/libethereum/BlockChain.cpp
+++ b/libethereum/BlockChain.cpp
@@ -101,7 +101,7 @@ bytes BlockChain::createGenesisBlock()
stateRoot = state.root();
}
- block.appendList(13)
+ block.appendList(15)
// TODO: maybe make logbloom correct?
<< h256() << EmptySHA3 << h160() << stateRoot << EmptyTrie << EmptyTrie << LogBloom() << c_genesisDifficulty << 0 << 0 << 1000000 << 0 << (unsigned)0 << string() << sha3(bytes(1, 42));
block.appendRaw(RLPEmptyList);
diff --git a/libethereum/State.cpp b/libethereum/State.cpp
index 5571a02e0..e49fa8082 100644
--- a/libethereum/State.cpp
+++ b/libethereum/State.cpp
@@ -817,8 +817,12 @@ void State::commitToMine(BlockChain const& _bc)
}
MemoryDB tm;
- GenericTrieDB receipts(&tm);
- receipts.init();
+ GenericTrieDB transactionsTrie(&tm);
+ transactionsTrie.init();
+
+ MemoryDB rm;
+ GenericTrieDB receiptsTrie(&rm);
+ receiptsTrie.init();
RLPStream txs;
txs.appendList(m_transactions.size());
@@ -827,12 +831,15 @@ void State::commitToMine(BlockChain const& _bc)
{
RLPStream k;
k << i;
- RLPStream v;
- m_receipts[i].streamRLP(v);
- receipts.insert(&k.out(), &v.out());
+
+ RLPStream receiptrlp;
+ m_receipts[i].streamRLP(receiptrlp);
+ receiptsTrie.insert(&k.out(), &receiptrlp.out());
RLPStream txrlp;
m_transactions[i].streamRLP(txrlp);
+ transactionsTrie.insert(&k.out(), &txrlp.out());
+
txs.appendRaw(txrlp.out());
}
@@ -840,7 +847,8 @@ void State::commitToMine(BlockChain const& _bc)
RLPStream(unclesCount).appendRaw(unclesData.out(), unclesCount).swapOut(m_currentUncles);
- m_currentBlock.receiptsRoot = receipts.root();
+ m_currentBlock.transactionsRoot = transactionsTrie.root();
+ m_currentBlock.receiptsRoot = receiptsTrie.root();
m_currentBlock.logBloom = logBloom();
m_currentBlock.sha3Uncles = sha3(m_currentUncles);