mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Make CMutableTransaction constructor explicit
Silently converting to a CMutableTransaction will drop all caches and should thus be done explicitly
This commit is contained in:
@@ -312,7 +312,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
|
||||
if (InsecureRandRange(10) == 0 && coinbase_coins.size()) {
|
||||
auto utxod = FindRandomFrom(coinbase_coins);
|
||||
// Reuse the exact same coinbase
|
||||
tx = std::get<0>(utxod->second);
|
||||
tx = CMutableTransaction{std::get<0>(utxod->second)};
|
||||
// shouldn't be available for reconnection if it's been duplicated
|
||||
disconnected_coins.erase(utxod->first);
|
||||
|
||||
@@ -331,7 +331,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
|
||||
// 1/20 times reconnect a previously disconnected tx
|
||||
if (randiter % 20 == 2 && disconnected_coins.size()) {
|
||||
auto utxod = FindRandomFrom(disconnected_coins);
|
||||
tx = std::get<0>(utxod->second);
|
||||
tx = CMutableTransaction{std::get<0>(utxod->second)};
|
||||
prevout = tx.vin[0].prevout;
|
||||
if (!CTransaction(tx).IsCoinBase() && !utxoset.count(prevout)) {
|
||||
disconnected_coins.erase(utxod->first);
|
||||
|
||||
Reference in New Issue
Block a user