|
14 | 14 |
|
15 | 15 | #include <boost/test/unit_test.hpp> |
16 | 16 |
|
17 | | -std::vector<std::pair<uint256, CTransactionRef>> extra_txn; |
| 17 | +std::vector<std::pair<Wtxid, CTransactionRef>> extra_txn; |
18 | 18 |
|
19 | 19 | BOOST_FIXTURE_TEST_SUITE(blockencodings_tests, RegTestingSetup) |
20 | 20 |
|
@@ -126,7 +126,7 @@ class TestHeaderAndShortIDs { |
126 | 126 | explicit TestHeaderAndShortIDs(const CBlock& block) : |
127 | 127 | TestHeaderAndShortIDs(CBlockHeaderAndShortTxIDs{block}) {} |
128 | 128 |
|
129 | | - uint64_t GetShortID(const uint256& txhash) const { |
| 129 | + uint64_t GetShortID(const Wtxid& txhash) const { |
130 | 130 | DataStream stream{}; |
131 | 131 | stream << *this; |
132 | 132 | CBlockHeaderAndShortTxIDs base; |
@@ -155,8 +155,8 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest) |
155 | 155 | shortIDs.prefilledtxn.resize(1); |
156 | 156 | shortIDs.prefilledtxn[0] = {1, block.vtx[1]}; |
157 | 157 | shortIDs.shorttxids.resize(2); |
158 | | - shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[0]->GetHash()); |
159 | | - shortIDs.shorttxids[1] = shortIDs.GetShortID(block.vtx[2]->GetHash()); |
| 158 | + shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[0]->GetWitnessHash()); |
| 159 | + shortIDs.shorttxids[1] = shortIDs.GetShortID(block.vtx[2]->GetWitnessHash()); |
160 | 160 |
|
161 | 161 | DataStream stream{}; |
162 | 162 | stream << shortIDs; |
@@ -226,7 +226,7 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest) |
226 | 226 | shortIDs.prefilledtxn[0] = {0, block.vtx[0]}; |
227 | 227 | shortIDs.prefilledtxn[1] = {1, block.vtx[2]}; // id == 1 as it is 1 after index 1 |
228 | 228 | shortIDs.shorttxids.resize(1); |
229 | | - shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[1]->GetHash()); |
| 229 | + shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[1]->GetWitnessHash()); |
230 | 230 |
|
231 | 231 | DataStream stream{}; |
232 | 232 | stream << shortIDs; |
|
0 commit comments