2WP: Separate mainchain and sidechain data structures into different classes, with the bitcoin data structures living in the src/primitives/bitcoin subdirectory.

This commit is contained in:
Mark Friedenbach 2017-02-28 16:36:56 -08:00 committed by Gregory Sanders
parent 2a0eda566a
commit f39435a877
17 changed files with 1297 additions and 143 deletions

View file

@ -17,6 +17,7 @@
#include "policy/policy.h"
#include "pow.h"
#include "primitives/transaction.h"
#include "primitives/bitcoin/merkleblock.h"
#include "script/script.h"
#include "script/sign.h"
#include "streams.h"
@ -610,12 +611,12 @@ static void MutateTxPeginSign(CMutableTransaction& tx, const string& flagStr)
if (contractData.size() != 40)
throw runtime_error("contract must be 40 bytes");
CDataStream ssProof(txoutproofData,SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_BITCOIN_BLOCK_OR_TX);
CMerkleBlock merkleBlock;
CDataStream ssProof(txoutproofData,SER_NETWORK, PROTOCOL_VERSION);
Sidechain::Bitcoin::CMerkleBlock merkleBlock;
ssProof >> merkleBlock;
CDataStream ssTx(txData, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_BITCOIN_BLOCK_OR_TX);
CTransaction txBTC;
CDataStream ssTx(txData, SER_NETWORK, PROTOCOL_VERSION);
Sidechain::Bitcoin::CTransaction txBTC;
ssTx >> txBTC;
vector<uint256> transactionHashes;