Skip to content

Commit a8707e5

Browse files
committed
miner: timelock coinbase transactions
The Consensus Cleanup soft fork proposal includes enforcing that coinbase transactions set their locktime field to the block height, minus 1 (as well as their nSequence such as to not disable the timelock). If such a fork were to be activated by Bitcoin users, miners need to be ready to produce compliant blocks at the risk of losing substantial amounts mining would-be invalid blocks. As miners are unfamously slow to upgrade, it's good to make this change as early as possible. Although Bitcoin Core's GBT implementation does not provide the "coinbasetxn" field, and mining pool software crafts the coinbase on its own, updating the Bitcoin Core mining code is a first step toward convincing pools to update their (often closed source) code. A possible followup is also to introduce new fields to GBT. In addition, this first step also makes it possible to test future Consensus Cleanup changes. The changes to the seemingly-unrelated RBF tests is because these tests assert an error message which may vary depending on the txid of the transactions used in the test. This commit changes the coinbase transaction structure and therefore impact the txid of transactions in all tests. The change to the "Bad snapshot" error message in the assumeutxo functional test is because this specific test case reads into the txid of the next transaction in the snapshot and asserts the error message based it gets on deserializing this txid as a coin for the previous transaction. As this commit changes this txid it impacts the deserialization error raised.
1 parent ecb9cf5 commit a8707e5

File tree

12 files changed

+53
-50
lines changed

12 files changed

+53
-50
lines changed

src/kernel/chainparams.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,9 @@ class CRegTestParams : public CChainParams
628628
m_assumeutxo_data = {
629629
{ // For use by unit tests
630630
.height = 110,
631-
.hash_serialized = AssumeutxoHash{uint256{"6657b736d4fe4db0cbc796789e812d5dba7f5c143764b1b6905612f1830609d1"}},
631+
.hash_serialized = AssumeutxoHash{uint256{"b952555c8ab81fec46f3d4253b7af256d766ceb39fb7752b9d18cdf4a0141327"}},
632632
.m_chain_tx_count = 111,
633-
.blockhash = consteval_ctor(uint256{"696e92821f65549c7ee134edceeeeaaa4105647a3c4fd9f298c0aec0ab50425c"}),
633+
.blockhash = consteval_ctor(uint256{"6affe030b7965ab538f820a56ef56c8149b7dc1d1c144af57113be080db7c397"}),
634634
},
635635
{
636636
// For use by fuzz target src/test/fuzz/utxo_snapshot.cpp
@@ -642,16 +642,16 @@ class CRegTestParams : public CChainParams
642642
{
643643
// For use by test/functional/feature_assumeutxo.py
644644
.height = 299,
645-
.hash_serialized = AssumeutxoHash{uint256{"a4bf3407ccb2cc0145c49ebba8fa91199f8a3903daf0883875941497d2493c27"}},
645+
.hash_serialized = AssumeutxoHash{uint256{"d2b051ff5e8eef46520350776f4100dd710a63447a8e01d917e92e79751a63e2"}},
646646
.m_chain_tx_count = 334,
647-
.blockhash = consteval_ctor(uint256{"3bb7ce5eba0be48939b7a521ac1ba9316afee2c7bada3a0cca24188e6d7d96c0"}),
647+
.blockhash = consteval_ctor(uint256{"5d72ceddcba989e3b0165eab863aafb8c0119b77126e423f4136cd65ef5ba9e9"}),
648648
},
649649
{
650650
// For use by test/functional/feature_assumeutxo.py
651651
// heretical deployments signals differently, generating
652652
// incompatible block hashes in the functional test cache
653653
.height = 299,
654-
.hash_serialized = AssumeutxoHash{uint256{"a4bf3407ccb2cc0145c49ebba8fa91199f8a3903daf0883875941497d2493c27"}},
654+
.hash_serialized = AssumeutxoHash{uint256{"d2b051ff5e8eef46520350776f4100dd710a63447a8e01d917e92e79751a63e2"}},
655655
.m_chain_tx_count = 334,
656656
.blockhash = consteval_ctor(uint256{"0300fa441b815903744564ef7eb87199b056e7ddb56283c51b6c40b1d6257b21"}),
657657
},

src/node/miner.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,13 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock()
167167
CMutableTransaction coinbaseTx;
168168
coinbaseTx.vin.resize(1);
169169
coinbaseTx.vin[0].prevout.SetNull();
170+
coinbaseTx.vin[0].nSequence = CTxIn::MAX_SEQUENCE_NONFINAL; // Make sure timelock is enforced.
170171
coinbaseTx.vout.resize(1);
171172
coinbaseTx.vout[0].scriptPubKey = m_options.coinbase_output_script;
172173
coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
173174
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
175+
Assert(nHeight > 0);
176+
coinbaseTx.nLockTime = static_cast<uint32_t>(nHeight - 1);
174177
pblock->vtx[0] = MakeTransactionRef(std::move(coinbaseTx));
175178
pblocktemplate->vchCoinbaseCommitment = m_chainstate.m_chainman.GenerateCoinbaseCommitment(*pblock, pindexPrev);
176179
pblocktemplate->vTxFees[0] = -nFees;

src/test/miner_tests.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,27 @@ BOOST_FIXTURE_TEST_SUITE(miner_tests, MinerTestingSetup)
7171
static CFeeRate blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
7272

7373
constexpr static struct {
74-
unsigned char extranonce;
74+
unsigned int extranonce;
7575
unsigned int nonce;
76-
} BLOCKINFO[]{{8, 582909131}, {0, 971462344}, {2, 1169481553}, {6, 66147495}, {7, 427785981}, {8, 80538907},
77-
{8, 207348013}, {2, 1951240923}, {4, 215054351}, {1, 491520534}, {8, 1282281282}, {4, 639565734},
78-
{3, 248274685}, {8, 1160085976}, {6, 396349768}, {5, 393780549}, {5, 1096899528}, {4, 965381630},
79-
{0, 728758712}, {5, 318638310}, {3, 164591898}, {2, 274234550}, {2, 254411237}, {7, 561761812},
80-
{2, 268342573}, {0, 402816691}, {1, 221006382}, {6, 538872455}, {7, 393315655}, {4, 814555937},
81-
{7, 504879194}, {6, 467769648}, {3, 925972193}, {2, 200581872}, {3, 168915404}, {8, 430446262},
82-
{5, 773507406}, {3, 1195366164}, {0, 433361157}, {3, 297051771}, {0, 558856551}, {2, 501614039},
83-
{3, 528488272}, {2, 473587734}, {8, 230125274}, {2, 494084400}, {4, 357314010}, {8, 60361686},
84-
{7, 640624687}, {3, 480441695}, {8, 1424447925}, {4, 752745419}, {1, 288532283}, {6, 669170574},
85-
{5, 1900907591}, {3, 555326037}, {3, 1121014051}, {0, 545835650}, {8, 189196651}, {5, 252371575},
86-
{0, 199163095}, {6, 558895874}, {6, 1656839784}, {6, 815175452}, {6, 718677851}, {5, 544000334},
87-
{0, 340113484}, {6, 850744437}, {4, 496721063}, {8, 524715182}, {6, 574361898}, {6, 1642305743},
88-
{6, 355110149}, {5, 1647379658}, {8, 1103005356}, {7, 556460625}, {3, 1139533992}, {5, 304736030},
89-
{2, 361539446}, {2, 143720360}, {6, 201939025}, {7, 423141476}, {4, 574633709}, {3, 1412254823},
90-
{4, 873254135}, {0, 341817335}, {6, 53501687}, {3, 179755410}, {5, 172209688}, {8, 516810279},
91-
{4, 1228391489}, {8, 325372589}, {6, 550367589}, {0, 876291812}, {7, 412454120}, {7, 717202854},
92-
{2, 222677843}, {6, 251778867}, {7, 842004420}, {7, 194762829}, {4, 96668841}, {1, 925485796},
93-
{0, 792342903}, {6, 678455063}, {6, 773251385}, {5, 186617471}, {6, 883189502}, {7, 396077336},
94-
{8, 254702874}, {0, 455592851}};
76+
} BLOCKINFO[]{{0, 3552706918}, {500, 37506755}, {1000, 948987788}, {400, 524762339}, {800, 258510074}, {300, 102309278},
77+
{1300, 54365202}, {600, 1107740426}, {1000, 203094491}, {900, 391178848}, {800, 381177271}, {600, 87188412},
78+
{0, 66522866}, {800, 874942736}, {1000, 89200838}, {400, 312638088}, {400, 66263693}, {500, 924648304},
79+
{400, 369913599}, {500, 47630099}, {500, 115045364}, {100, 277026602}, {1100, 809621409}, {700, 155345322},
80+
{800, 943579953}, {400, 28200730}, {900, 77200495}, {0, 105935488}, {400, 698721821}, {500, 111098863},
81+
{1300, 445389594}, {500, 621849894}, {1400, 56010046}, {1100, 370669776}, {1200, 380301940}, {1200, 110654905},
82+
{400, 213771024}, {1500, 120014726}, {1200, 835019014}, {1500, 624817237}, {900, 1404297}, {400, 189414558},
83+
{400, 293178348}, {1100, 15393789}, {600, 396764180}, {800, 1387046371}, {800, 199368303}, {700, 111496662},
84+
{100, 129759616}, {200, 536577982}, {500, 125881300}, {500, 101053391}, {1200, 471590548}, {900, 86957729},
85+
{1200, 179604104}, {600, 68658642}, {1000, 203295701}, {500, 139615361}, {900, 233693412}, {300, 153225163},
86+
{0, 27616254}, {1200, 9856191}, {100, 220392722}, {200, 66257599}, {1100, 145489641}, {1300, 37859442},
87+
{400, 5816075}, {1200, 215752117}, {1400, 32361482}, {1400, 6529223}, {500, 143332977}, {800, 878392},
88+
{700, 159290408}, {400, 123197595}, {700, 43988693}, {300, 304224916}, {700, 214771621}, {1100, 274148273},
89+
{400, 285632418}, {1100, 923451065}, {600, 12818092}, {1200, 736282054}, {1000, 246683167}, {600, 92950402},
90+
{1400, 29223405}, {1000, 841327192}, {700, 174301283}, {1400, 214009854}, {1000, 6989517}, {1200, 278226956},
91+
{700, 540219613}, {400, 93663104}, {1100, 152345635}, {1500, 464194499}, {1300, 333850111}, {600, 258311263},
92+
{600, 90173162}, {1000, 33590797}, {1500, 332866027}, {100, 204704427}, {1000, 463153545}, {800, 303244785},
93+
{600, 88096214}, {0, 137477892}, {1200, 195514506}, {300, 704114595}, {900, 292087369}, {1400, 758684870},
94+
{1300, 163493028}, {1200, 53151293}};
9595

9696
static std::unique_ptr<CBlockIndex> CreateBlockIndex(int nHeight, CBlockIndex* active_chain_tip) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
9797
{

src/test/rbf_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
311311
// Tests for CheckConflictTopology
312312

313313
// Tx4 has 23 descendants
314-
BOOST_CHECK_EQUAL(pool.CheckConflictTopology(set_34_cpfp).value(), strprintf("%s has 23 descendants, max 1 allowed", entry4_high->GetSharedTx()->GetHash().ToString()));
314+
BOOST_CHECK_EQUAL(pool.CheckConflictTopology(set_34_cpfp).value(), strprintf("%s has 24 descendants, max 1 allowed", entry3_low->GetSharedTx()->GetHash().ToString()));
315315

316316
// No descendants yet
317317
BOOST_CHECK(pool.CheckConflictTopology({entry9_unchained}) == std::nullopt);
@@ -441,7 +441,7 @@ BOOST_FIXTURE_TEST_CASE(improves_feerate, TestChain100Setup)
441441
const auto res3 = ImprovesFeerateDiagram(*changeset);
442442
BOOST_CHECK(res3.has_value());
443443
BOOST_CHECK(res3.value().first == DiagramCheckError::UNCALCULABLE);
444-
BOOST_CHECK(res3.value().second == strprintf("%s has 2 ancestors, max 1 allowed", tx5->GetHash().GetHex()));
444+
BOOST_CHECK_MESSAGE(res3.value().second == strprintf("%s has 2 descendants, max 1 allowed", tx1->GetHash().GetHex()), res3.value().second);
445445
}
446446

447447
BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
@@ -536,7 +536,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
536536
changeset->StageAddition(replacement_tx, high_fee, 0, 1, 0, false, 4, LockPoints());
537537
const auto replace_too_large{changeset->CalculateChunksForRBF()};
538538
BOOST_CHECK(!replace_too_large.has_value());
539-
BOOST_CHECK_EQUAL(util::ErrorString(replace_too_large).original, strprintf("%s has 2 ancestors, max 1 allowed", normal_tx->GetHash().GetHex()));
539+
BOOST_CHECK_EQUAL(util::ErrorString(replace_too_large).original, strprintf("%s has both ancestor and descendant, exceeding cluster limit of 2", high_tx->GetHash().GetHex()));
540540
}
541541

542542
// Make a size 2 cluster that is itself two chunks; evict both txns
@@ -623,7 +623,7 @@ BOOST_FIXTURE_TEST_CASE(calc_feerate_diagram_rbf, TestChain100Setup)
623623
const auto replace_cluster_size_3{changeset->CalculateChunksForRBF()};
624624

625625
BOOST_CHECK(!replace_cluster_size_3.has_value());
626-
BOOST_CHECK_EQUAL(util::ErrorString(replace_cluster_size_3).original, strprintf("%s has both ancestor and descendant, exceeding cluster limit of 2", conflict_1_child->GetHash().GetHex()));
626+
BOOST_CHECK_EQUAL(util::ErrorString(replace_cluster_size_3).original, strprintf("%s has 2 descendants, max 1 allowed", conflict_1->GetHash().GetHex()));
627627
}
628628
}
629629

src/test/util/setup_common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ TestChain100Setup::TestChain100Setup(
369369
LOCK(::cs_main);
370370
assert(
371371
m_node.chainman->ActiveChain().Tip()->GetBlockHash().ToString() ==
372-
"571d80a9967ae599cec0448b0b0ba1cfb606f584d8069bd7166b86854ba7a191");
372+
"0c8c5f79505775a0f6aed6aca2350718ceb9c6f2c878667864d5c7a6d8ffa2a6");
373373
}
374374
}
375375

src/test/validation_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ BOOST_AUTO_TEST_CASE(test_assumeutxo)
142142
}
143143

144144
const auto out110 = *params->AssumeutxoForHeight(110);
145-
BOOST_CHECK_EQUAL(out110.hash_serialized.ToString(), "6657b736d4fe4db0cbc796789e812d5dba7f5c143764b1b6905612f1830609d1");
145+
BOOST_CHECK_EQUAL(out110.hash_serialized.ToString(), "b952555c8ab81fec46f3d4253b7af256d766ceb39fb7752b9d18cdf4a0141327");
146146
BOOST_CHECK_EQUAL(out110.m_chain_tx_count, 111U);
147147

148-
const auto out110_2 = *params->AssumeutxoForBlockhash(uint256{"696e92821f65549c7ee134edceeeeaaa4105647a3c4fd9f298c0aec0ab50425c"});
149-
BOOST_CHECK_EQUAL(out110_2.hash_serialized.ToString(), "6657b736d4fe4db0cbc796789e812d5dba7f5c143764b1b6905612f1830609d1");
148+
const auto out110_2 = *params->AssumeutxoForBlockhash(uint256{"6affe030b7965ab538f820a56ef56c8149b7dc1d1c144af57113be080db7c397"});
149+
BOOST_CHECK_EQUAL(out110_2.hash_serialized.ToString(), "b952555c8ab81fec46f3d4253b7af256d766ceb39fb7752b9d18cdf4a0141327");
150150
BOOST_CHECK_EQUAL(out110_2.m_chain_tx_count, 111U);
151151
}
152152

test/functional/feature_assumeutxo.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ def expected_error(msg):
139139
# (content, offset, wrong_hash, custom_message)
140140
[b"\xff" * 32, 0, "77874d48d932a5cb7a7f770696f5224ff05746fdcf732a58270b45da0f665934", None], # wrong outpoint hash
141141
[b"\xfd\xff\xff", 32, None, "Mismatch in coins count in snapshot metadata and actual snapshot data"], # txid coins count exceeds coins left
142-
[b"\x01", 33, "9f4d897031ab8547665b4153317ae2fdbf0130c7840b66427ebc48b881cb80ad", None], # wrong outpoint index
143-
[b"\x81", 34, "3da966ba9826fb6d2604260e01607b55ba44e1a5de298606b08704bc62570ea8", None], # wrong coin code VARINT
144-
[b"\x80", 34, "091e893b3ccb4334378709578025356c8bcb0a623f37c7c4e493133c988648e5", None], # another wrong coin code
142+
[b"\x01", 33, "9f562925721e4f97e6fde5b590dbfede51e2204a68639525062ad064545dd0ea", None], # wrong outpoint index
143+
[b"\x82", 34, "161393f07f8ad71760b3910a914f677f2cb166e5bcf5354e50d46b78c0422d15", None], # wrong coin code VARINT
144+
[b"\x80", 34, "e6fae191ef851554467b68acff01ca09ad0a2e48c9b3dfea46cf7d35a7fd0ad0", None], # another wrong coin code
145145
[b"\x84\x58", 34, None, "Bad snapshot data after deserializing 0 coins"], # wrong coin case with height 364 and coinbase 0
146146
[
147147
# compressed txout value + scriptpubkey
@@ -160,12 +160,12 @@ def expected_error(msg):
160160
f.write(content)
161161
f.write(valid_snapshot_contents[(5 + 2 + 4 + 32 + 8 + offset + len(content)):])
162162

163-
msg = custom_message if custom_message is not None else f"Bad snapshot content hash: expected a4bf3407ccb2cc0145c49ebba8fa91199f8a3903daf0883875941497d2493c27, got {wrong_hash}."
163+
msg = custom_message if custom_message is not None else f"Bad snapshot content hash: expected d2b051ff5e8eef46520350776f4100dd710a63447a8e01d917e92e79751a63e2, got {wrong_hash}."
164164
expected_error(msg)
165165

166166
def test_headers_not_synced(self, valid_snapshot_path):
167167
for node in self.nodes[1:]:
168-
msg = "Unable to load UTXO snapshot: The base block header (0300fa441b815903744564ef7eb87199b056e7ddb56283c51b6c40b1d6257b21) must appear in the headers chain. Make sure all headers are syncing, and call loadtxoutset again."
168+
msg = "Unable to load UTXO snapshot: The base block header (5d72ceddcba989e3b0165eab863aafb8c0119b77126e423f4136cd65ef5ba9e9) must appear in the headers chain. Make sure all headers are syncing, and call loadtxoutset again."
169169
assert_raises_rpc_error(-32603, msg, node.loadtxoutset, valid_snapshot_path)
170170

171171
def test_invalid_chainstate_scenarios(self):
@@ -224,7 +224,7 @@ def test_snapshot_block_invalidated(self, dump_output_path):
224224
block_hash = node.getblockhash(height)
225225
node.invalidateblock(block_hash)
226226
assert_equal(node.getblockcount(), height - 1)
227-
msg = "Unable to load UTXO snapshot: The base block header (0300fa441b815903744564ef7eb87199b056e7ddb56283c51b6c40b1d6257b21) is part of an invalid chain."
227+
msg = "Unable to load UTXO snapshot: The base block header (5d72ceddcba989e3b0165eab863aafb8c0119b77126e423f4136cd65ef5ba9e9) is part of an invalid chain."
228228
assert_raises_rpc_error(-32603, msg, node.loadtxoutset, dump_output_path)
229229
node.reconsiderblock(block_hash)
230230

@@ -426,7 +426,7 @@ def run_test(self):
426426
def check_dump_output(output):
427427
assert_equal(
428428
output['txoutset_hash'],
429-
"a4bf3407ccb2cc0145c49ebba8fa91199f8a3903daf0883875941497d2493c27")
429+
"d2b051ff5e8eef46520350776f4100dd710a63447a8e01d917e92e79751a63e2")
430430
assert_equal(output["nchaintx"], blocks[SNAPSHOT_BASE_HEIGHT].chain_tx)
431431

432432
check_dump_output(dump_output)
@@ -456,7 +456,7 @@ def check_dump_output(output):
456456
dump_output4 = n0.dumptxoutset(path='utxos4.dat', rollback=prev_snap_height)
457457
assert_equal(
458458
dump_output4['txoutset_hash'],
459-
"8a1db0d6e958ce0d7c963bc6fc91ead596c027129bacec68acc40351037b09d7")
459+
"45ac2777b6ca96588210e2a4f14b602b41ec37b8b9370673048cc0af434a1ec8")
460460
assert sha256sum_file(dump_output['path']) != sha256sum_file(dump_output4['path'])
461461

462462
# Use a hash instead of a height

test/functional/feature_utxo_set_hash.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ def test_muhash_implementation(self):
6767
assert_equal(finalized[::-1].hex(), node_muhash)
6868

6969
self.log.info("Test deterministic UTXO set hash results")
70-
assert_equal(node.gettxoutsetinfo()['hash_serialized_3'], "d1c7fec1c0623f6793839878cbe2a531eb968b50b27edd6e2a57077a5aed6094")
71-
assert_equal(node.gettxoutsetinfo("muhash")['muhash'], "d1725b2fe3ef43e55aa4907480aea98d406fc9e0bf8f60169e2305f1fbf5961b")
70+
assert_equal(node.gettxoutsetinfo()['hash_serialized_3'], "e0b4c80f2880985fdf1adc331ed0735ac207588f986c91c7c05e8cf5fe6780f0")
71+
assert_equal(node.gettxoutsetinfo("muhash")['muhash'], "8739b878f23030ef39a5547edc7b57f88d50fdaaf47314ff0524608deb13067e")
7272

7373
def run_test(self):
7474
self.test_muhash_implementation()

test/functional/mempool_package_rbf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def test_wrong_conflict_cluster_size_parents_child(self):
383383
# Now make conflicting packages for each coin
384384
package_hex1, _package_txns1 = self.create_simple_package(coin1, DEFAULT_FEE, DEFAULT_CHILD_FEE)
385385
package_result = node.submitpackage(package_hex1)
386-
assert_equal(f"package RBF failed: {child_result['tx'].rehash()} has 2 ancestors, max 1 allowed", package_result["package_msg"])
386+
assert_equal(f"package RBF failed: {parent1_result['tx'].rehash()} is not the only parent of child {child_result['tx'].rehash()}", package_result["package_msg"])
387387

388388
package_hex2, _package_txns2 = self.create_simple_package(coin2, DEFAULT_FEE, DEFAULT_CHILD_FEE)
389389
package_result = node.submitpackage(package_hex2)
@@ -437,7 +437,7 @@ def test_wrong_conflict_cluster_size_parent_children(self):
437437
# Now make conflicting packages for each coin
438438
package_hex1, _package_txns1 = self.create_simple_package(coin1, DEFAULT_FEE, DEFAULT_CHILD_FEE)
439439
package_result = node.submitpackage(package_hex1)
440-
assert_equal(f"package RBF failed: {child2_result['tx'].rehash()} is not the only child of parent {parent_result['tx'].rehash()}", package_result["package_msg"])
440+
assert_equal(f"package RBF failed: {child1_result['tx'].rehash()} is not the only child of parent {parent_result['tx'].rehash()}", package_result["package_msg"])
441441

442442
package_hex2, _package_txns2 = self.create_simple_package(coin2, DEFAULT_FEE, DEFAULT_CHILD_FEE)
443443
package_result = node.submitpackage(package_hex2)

test/functional/rpc_dumptxoutset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ def run_test(self):
4949
# Blockhash should be deterministic based on mocked time.
5050
assert_equal(
5151
out['base_hash'],
52-
'09abf0e7b510f61ca6cf33bab104e9ee99b3528b371d27a2d4b39abb800fba7e')
52+
'6885775faa46290bedfa071f22d0598c93f1d7e01f24607c4dedd69b9baa4a8f')
5353

5454
# UTXO snapshot hash should be deterministic based on mocked time.
5555
assert_equal(
5656
sha256sum_file(str(expected_path)).hex(),
57-
'31fcdd0cf542a4b1dfc13c3c05106620ce48951ef62907dd8e5e8c15a0aa993b')
57+
'd9506d541437f5e2892d6b6ea173f55233de11601650c157a27d8f2b9d08cb6f')
5858

5959
assert_equal(
60-
out['txoutset_hash'], 'a0b7baa3bf5ccbd3279728f230d7ca0c44a76e9923fca8f32dbfd08d65ea496a')
60+
out['txoutset_hash'], 'd4453995f4f20db7bb3a604afd10d7128e8ee11159cde56d5b2fd7f55be7c74c')
6161
assert_equal(out['nchaintx'], 101)
6262

6363
# Specifying a path to an existing or invalid file will fail.

0 commit comments

Comments
 (0)