Browse Source

BlockWeight: uncle POW issue

cl-refactor
Dimitry 10 years ago
parent
commit
1f8bd0fe68
  1. 8
      test/libethereum/blockchain.cpp

8
test/libethereum/blockchain.cpp

@ -214,9 +214,12 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
uncleStream.appendRaw(uncleRlp.out()); uncleStream.appendRaw(uncleRlp.out());
} }
if (vBiUncles.size())
{
// update unclehash in case of invalid uncles // update unclehash in case of invalid uncles
current_BlockHeader.sha3Uncles = sha3(uncleStream.out()); current_BlockHeader.sha3Uncles = sha3(uncleStream.out());
updatePoW(current_BlockHeader); updatePoW(current_BlockHeader);
}
if (blObj.count("blockHeader")) if (blObj.count("blockHeader"))
overwriteBlockHeader(current_BlockHeader, blObj); overwriteBlockHeader(current_BlockHeader, blObj);
@ -242,7 +245,10 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
blObj["rlp"] = toHex(block2.out(), 2, HexPrefix::Add); blObj["rlp"] = toHex(block2.out(), 2, HexPrefix::Add);
if (sha3(RLP(state.blockData())[0].data()) != sha3(RLP(block2.out())[0].data())) if (sha3(RLP(state.blockData())[0].data()) != sha3(RLP(block2.out())[0].data()))
cnote << "block header mismatch\n"; {
cnote << "block header mismatch state.blockData() vs updated state.info()\n";
cerr << toHex(state.blockData()) << "vs" << toHex(block2.out());
}
if (sha3(RLP(state.blockData())[1].data()) != sha3(RLP(block2.out())[1].data())) if (sha3(RLP(state.blockData())[1].data()) != sha3(RLP(block2.out())[1].data()))
cnote << "txs mismatch\n"; cnote << "txs mismatch\n";

Loading…
Cancel
Save