diff options
| author | Pieter Wuille <[email protected]> | 2016-10-10 12:32:17 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-10-10 13:16:40 +0200 |
| commit | 6429cfa8a70308241c576aeb92ffe3db5203b2ef (patch) | |
| tree | 12128520a1c638291d0dd133bcbceb1694e51385 /src/blockencodings.cpp | |
| parent | Merge #8891: [Doc] Update bips.md for Segregated Witness (diff) | |
| parent | [qa] Update p2p-compactblocks.py for compactblocks v2 (diff) | |
| download | discoin-6429cfa8a70308241c576aeb92ffe3db5203b2ef.tar.xz discoin-6429cfa8a70308241c576aeb92ffe3db5203b2ef.zip | |
Merge #8393: Support for compact blocks together with segwit
27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 (Suhas Daftuar)
422fac6 [qa] Add support for compactblocks v2 to mininode (Suhas Daftuar)
f5b9b8f [qa] Fix bug in mininode witness deserialization (Suhas Daftuar)
6aa28ab Use cmpctblock type 2 for segwit-enabled transfer (Pieter Wuille)
be7555f Fix overly-prescriptive p2p-segwit test for new fetch logic (Matt Corallo)
06128da Make GetFetchFlags always request witness objects from witness peers (Matt Corallo)
Diffstat (limited to 'src/blockencodings.cpp')
| -rw-r--r-- | src/blockencodings.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp index df237f8f2..93d3fa372 100644 --- a/src/blockencodings.cpp +++ b/src/blockencodings.cpp @@ -17,7 +17,7 @@ #define MIN_TRANSACTION_BASE_SIZE (::GetSerializeSize(CTransaction(), SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS)) -CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) : +CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block, bool fUseWTXID) : nonce(GetRand(std::numeric_limits<uint64_t>::max())), shorttxids(block.vtx.size() - 1), prefilledtxn(1), header(block) { FillShortTxIDSelector(); @@ -25,7 +25,7 @@ CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block) : prefilledtxn[0] = {0, block.vtx[0]}; for (size_t i = 1; i < block.vtx.size(); i++) { const CTransaction& tx = block.vtx[i]; - shorttxids[i - 1] = GetShortID(tx.GetHash()); + shorttxids[i - 1] = GetShortID(fUseWTXID ? tx.GetWitnessHash() : tx.GetHash()); } } |