mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Deserialize merkle proofs without witness, which matters for dynafed
This commit is contained in:
parent
830f917235
commit
8d3091bbcb
2 changed files with 7 additions and 1 deletions
|
|
@ -188,7 +188,7 @@ static bool GetBlockAndTxFromMerkleBlock(uint256& block_hash, uint256& tx_hash,
|
|||
try {
|
||||
std::vector<uint256> tx_hashes;
|
||||
std::vector<unsigned int> tx_indices;
|
||||
CDataStream merkle_block_stream(merkle_block_raw, SER_NETWORK, PROTOCOL_VERSION);
|
||||
CDataStream merkle_block_stream(merkle_block_raw, SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS);
|
||||
merkle_block_stream >> merkle_block;
|
||||
block_hash = merkle_block.header.GetHash();
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <primitives/bitcoin/transaction.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <chain.h>
|
||||
|
||||
/** Calculates script necessary for p2ch peg-in transactions */
|
||||
CScript calculate_contract(const CScript& federationRedeemScript, const CScript& witnessProgram);
|
||||
|
|
@ -31,4 +32,9 @@ CTxOut GetPeginOutputFromWitness(const CScriptWitness& pegin_witness);
|
|||
*/
|
||||
bool MatchLiquidWatchman(const CScript& script);
|
||||
|
||||
/** Get full fedpegscripts from two previous epoch starts based on given index
|
||||
* nextblock_validation is false when doing block validation, true for mempool
|
||||
* or "lookahead" purposes. Newest epochs first. */
|
||||
std::vector<CScript> GetValidFedpegScripts(const CBlockIndex* pblockindex, const Consensus::Params& params, bool nextblock_validation);
|
||||
|
||||
#endif // BITCOIN_PEGINS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue