Skip to content

Commit

Permalink
Merge bitcoin#23546: scripted-diff: Use clang-tidy syntax for C++ nam…
Browse files Browse the repository at this point in the history
…ed arguments (tests only)

fa00447 scripted-diff: Use clang-tidy syntax for C++ named arguments (MarcoFalke)
fae13c3 doc: Use clang-tidy comments in crypto_tests (MarcoFalke)

Pull request description:

  Incorrect named args are source of bugs, like bitcoin#22979.

  To allow them being checked by `clang-tidy`, use a format it can understand.

ACKs for top commit:
  shaavan:
    ACK fa00447
  rajarshimaitra:
    ACK fa00447
  jonatack:
    ACK fa00447
  fanquake:
    ACK fa00447
  • Loading branch information
knst committed Feb 27, 2025
1 parent 0c0b1a2 commit 2479413
Show file tree
Hide file tree
Showing 30 changed files with 194 additions and 178 deletions.
2 changes: 1 addition & 1 deletion src/test/block_reward_reallocation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static void SignTransaction(const CTxMemPool& mempool, CMutableTransaction& tx,

for (auto [i, input] : enumerate(tx.vin)) {
uint256 hashBlock;
CTransactionRef txFrom = GetTransaction(/* block_index */ nullptr, &mempool, input.prevout.hash, Params().GetConsensus(), hashBlock);
CTransactionRef txFrom = GetTransaction(/*block_index=*/nullptr, &mempool, input.prevout.hash, Params().GetConsensus(), hashBlock);
BOOST_REQUIRE(txFrom);
BOOST_REQUIRE(SignSignature(tempKeystore, *txFrom, tx, i, SIGHASH_ALL));
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/coins_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
CCoinsViewTest base;
SimulationTest(&base, false);

CCoinsViewDB db_base{"test", /*nCacheSize*/ 1 << 23, /*fMemory*/ true, /*fWipe*/ false};
CCoinsViewDB db_base{"test", /*nCacheSize=*/1 << 23, /*fMemory=*/true, /*fWipe=*/false};
SimulationTest(&db_base, true);
}

Expand Down
8 changes: 4 additions & 4 deletions src/test/crypto_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,10 +1067,10 @@ BOOST_AUTO_TEST_CASE(hkdf_hmac_sha256_l32_tests)
{
// Use rfc5869 test vectors but truncated to 32 bytes (our implementation only support length 32)
TestHKDF_SHA256_32(
/* IKM */ "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
/* salt */ "000102030405060708090a0b0c",
/* info */ "f0f1f2f3f4f5f6f7f8f9",
/* expected OKM */ "3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf");
/*ikm_hex=*/"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
/*salt_hex=*/"000102030405060708090a0b0c",
/*info_hex=*/"f0f1f2f3f4f5f6f7f8f9",
/*okm_check_hex=*/"3cb25f25faacd57a90434f64d0362f2a2d2d0a90cf1a5a4c5db02d56ecc4c5bf");
TestHKDF_SHA256_32(
"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f",
"606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeaf",
Expand Down
2 changes: 1 addition & 1 deletion src/test/denialofservice_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
peerLogic->InitializeNode(*nodes[2], NODE_NETWORK);
nodes[2]->fSuccessfullyConnected = true;
connman->AddTestNode(*nodes[2]);
peerLogic->Misbehaving(nodes[2]->GetId(), DISCOURAGEMENT_THRESHOLD, /* message */ "");
peerLogic->Misbehaving(nodes[2]->GetId(), DISCOURAGEMENT_THRESHOLD, /*message=*/"");
BOOST_CHECK(peerLogic->SendMessages(nodes[2]));
BOOST_CHECK(banman->IsDiscouraged(addr[0]));
BOOST_CHECK(banman->IsDiscouraged(addr[1]));
Expand Down
4 changes: 2 additions & 2 deletions src/test/evo_deterministicmns_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static void SignTransaction(const CTxMemPool& mempool, CMutableTransaction& tx,

for (size_t i = 0; i < tx.vin.size(); i++) {
uint256 hashBlock;
CTransactionRef txFrom = GetTransaction(/* block_index */ nullptr, &mempool, tx.vin[i].prevout.hash, Params().GetConsensus(), hashBlock);
CTransactionRef txFrom = GetTransaction(/*block_index=*/nullptr, &mempool, tx.vin[i].prevout.hash, Params().GetConsensus(), hashBlock);
BOOST_REQUIRE(txFrom);
BOOST_REQUIRE(SignSignature(tempKeystore, *txFrom, tx, i, SIGHASH_ALL));
}
Expand Down Expand Up @@ -227,7 +227,7 @@ static bool CheckTransactionSignature(const CTxMemPool& mempool, const CMutableT
for (unsigned int i = 0; i < tx.vin.size(); i++) {
const auto& txin = tx.vin[i];
uint256 hashBlock;
CTransactionRef txFrom = GetTransaction(/* block_index */ nullptr, &mempool, txin.prevout.hash, Params().GetConsensus(), hashBlock);
CTransactionRef txFrom = GetTransaction(/*block_index=*/nullptr, &mempool, txin.prevout.hash, Params().GetConsensus(), hashBlock);
BOOST_REQUIRE(txFrom);

CAmount amount = txFrom->vout[txin.prevout.n].nValue;
Expand Down
6 changes: 3 additions & 3 deletions src/test/fuzz/addrman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ FUZZ_TARGET(addrman, .init = initialize_addrman)
},
[&] {
(void)addr_man.GetAddr(
/* max_addresses */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
/* max_pct */ fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
/* network */ std::nullopt);
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
/*max_pct=*/fuzzed_data_provider.ConsumeIntegralInRange<size_t>(0, 4096),
/*network=*/std::nullopt);
},
[&] {
std::vector<CAddress> addresses;
Expand Down
4 changes: 2 additions & 2 deletions src/test/fuzz/banman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ FUZZ_TARGET(banman, .init = initialize_banman)
}

{
BanMan ban_man{banlist_file, /* client_interface */ nullptr, /* default_ban_time */ ConsumeBanTimeOffset(fuzzed_data_provider)};
BanMan ban_man{banlist_file, /*client_interface=*/nullptr, /*default_ban_time=*/ConsumeBanTimeOffset(fuzzed_data_provider)};
// The complexity is O(N^2), where N is the input size, because each call
// might call DumpBanlist (or other methods that are at least linear
// complexity of the input size).
Expand Down Expand Up @@ -106,7 +106,7 @@ FUZZ_TARGET(banman, .init = initialize_banman)
SetMockTime(ConsumeTime(fuzzed_data_provider));
banmap_t banmap;
ban_man.GetBanned(banmap);
BanMan ban_man_read{banlist_file, /* client_interface */ nullptr, /* default_ban_time */ 0};
BanMan ban_man_read{banlist_file, /*client_interface=*/nullptr, /*default_ban_time=*/0};
banmap_t banmap_read;
ban_man_read.GetBanned(banmap_read);
assert(banmap == banmap_read);
Expand Down
12 changes: 6 additions & 6 deletions src/test/fuzz/connman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ FUZZ_TARGET(connman, .init = initialize_connman)
},
[&] {
(void)connman.GetAddresses(
/* max_addresses */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
/* max_pct */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
/* network */ std::nullopt);
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
/*max_pct=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
/*network=*/std::nullopt);
},
[&] {
(void)connman.GetAddresses(
/* requestor */ random_node,
/* max_addresses */ fuzzed_data_provider.ConsumeIntegral<size_t>(),
/* max_pct */ fuzzed_data_provider.ConsumeIntegral<size_t>());
/*requestor=*/random_node,
/*max_addresses=*/fuzzed_data_provider.ConsumeIntegral<size_t>(),
/*max_pct=*/fuzzed_data_provider.ConsumeIntegral<size_t>());
},
[&] {
(void)connman.GetDeterministicRandomizer(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/crypto_diff_fuzz_chacha20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void ECRYPT_keysetup(ECRYPT_ctx* x, const u8* k, u32 kbits, u32 ivbits)
x->input[5] = U8TO32_LITTLE(k + 4);
x->input[6] = U8TO32_LITTLE(k + 8);
x->input[7] = U8TO32_LITTLE(k + 12);
if (kbits == 256) { /* recommended */
if (kbits == 256) { /*recommended=*/
k += 16;
constants = sigma;
} else { /* kbits == 128 */
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/key_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ FUZZ_TARGET(key_io, .init = initialize_key_io)

const CTxDestination tx_destination = DecodeDestination(random_string);
(void)DescribeAddress(tx_destination);
(void)GetKeyForDestination(/* store */ {}, tx_destination);
(void)GetKeyForDestination(/*store=*/{}, tx_destination);
(void)GetScriptForDestination(tx_destination);
(void)IsValidDestination(tx_destination);

Expand Down
28 changes: 14 additions & 14 deletions src/test/fuzz/node_eviction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ FUZZ_TARGET(node_eviction)
std::vector<NodeEvictionCandidate> eviction_candidates;
while (fuzzed_data_provider.ConsumeBool()) {
eviction_candidates.push_back({
/* id */ fuzzed_data_provider.ConsumeIntegral<NodeId>(),
/* m_connected */ std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/* m_min_ping_time */ std::chrono::microseconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/* m_last_block_time */ std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/* m_last_tx_time */ std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/* fRelevantServices */ fuzzed_data_provider.ConsumeBool(),
/* m_relay_txs */ fuzzed_data_provider.ConsumeBool(),
/* fBloomFilter */ fuzzed_data_provider.ConsumeBool(),
/* nKeyedNetGroup */ fuzzed_data_provider.ConsumeIntegral<uint64_t>(),
/* prefer_evict */ fuzzed_data_provider.ConsumeBool(),
/* m_is_local */ fuzzed_data_provider.ConsumeBool(),
/* m_network */ fuzzed_data_provider.PickValueInArray(ALL_NETWORKS),
/* m_noban */ fuzzed_data_provider.ConsumeBool(),
/* m_conn_type */ fuzzed_data_provider.PickValueInArray(ALL_CONNECTION_TYPES),
/*id=*/fuzzed_data_provider.ConsumeIntegral<NodeId>(),
/*m_connected=*/std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/*m_min_ping_time=*/std::chrono::microseconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/*m_last_block_time=*/std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/*m_last_tx_time=*/std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<int64_t>()},
/*fRelevantServices=*/fuzzed_data_provider.ConsumeBool(),
/*m_relay_txs=*/fuzzed_data_provider.ConsumeBool(),
/*fBloomFilter=*/fuzzed_data_provider.ConsumeBool(),
/*nKeyedNetGroup=*/fuzzed_data_provider.ConsumeIntegral<uint64_t>(),
/*prefer_evict=*/fuzzed_data_provider.ConsumeBool(),
/*m_is_local=*/fuzzed_data_provider.ConsumeBool(),
/*m_network=*/fuzzed_data_provider.PickValueInArray(ALL_NETWORKS),
/*m_noban=*/fuzzed_data_provider.ConsumeBool(),
/*m_conn_type=*/fuzzed_data_provider.PickValueInArray(ALL_CONNECTION_TYPES),
});
}
// Make a copy since eviction_candidates may be in some valid but otherwise
Expand Down
4 changes: 2 additions & 2 deletions src/test/fuzz/policy_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ FUZZ_TARGET(policy_estimator, .init = initialize_policy_estimator)
const CTransaction tx{*mtx};
block_policy_estimator.processTransaction(ConsumeTxMemPoolEntry(fuzzed_data_provider, tx), fuzzed_data_provider.ConsumeBool());
if (fuzzed_data_provider.ConsumeBool()) {
(void)block_policy_estimator.removeTx(tx.GetHash(), /* inBlock */ fuzzed_data_provider.ConsumeBool());
(void)block_policy_estimator.removeTx(tx.GetHash(), /*inBlock=*/fuzzed_data_provider.ConsumeBool());
}
},
[&] {
Expand All @@ -56,7 +56,7 @@ FUZZ_TARGET(policy_estimator, .init = initialize_policy_estimator)
block_policy_estimator.processBlock(fuzzed_data_provider.ConsumeIntegral<unsigned int>(), ptrs);
},
[&] {
(void)block_policy_estimator.removeTx(ConsumeUInt256(fuzzed_data_provider), /* inBlock */ fuzzed_data_provider.ConsumeBool());
(void)block_policy_estimator.removeTx(ConsumeUInt256(fuzzed_data_provider), /*inBlock=*/fuzzed_data_provider.ConsumeBool());
},
[&] {
block_policy_estimator.FlushUnconfirmed();
Expand Down
7 changes: 5 additions & 2 deletions src/test/fuzz/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ FUZZ_TARGET(transaction, .init = initialize_transaction)
(void)AreInputsStandard(tx, coins_view_cache);

UniValue u(UniValue::VOBJ);
TxToUniv(tx, /* hashBlock */ uint256::ZERO, u);
TxToUniv(tx, /* hashBlock */ uint256::ONE, u);
TxToUniv(tx, /*hashBlock=*/uint256::ZERO, u);
TxToUniv(tx, /*hashBlock=*/uint256::ONE, u);

// TxToUniv(tx, /*hashBlock=*/uint256::ZERO, /*include_addresses=*/true, u);
// TxToUniv(tx, /*hashBlock=*/uint256::ONE, /*include_addresses=*/false, u);
}
10 changes: 5 additions & 5 deletions src/test/fuzz/tx_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void Finish(FuzzedDataProvider& fuzzed_data_provider, MockedTxPool& tx_pool, con
{
BlockAssembler::Options options;
options.nBlockMaxSize = fuzzed_data_provider.ConsumeIntegralInRange(0U, MaxBlockSize(true));
options.blockMinFeeRate = CFeeRate{ConsumeMoney(fuzzed_data_provider, /* max */ COIN)};
options.blockMinFeeRate = CFeeRate{ConsumeMoney(fuzzed_data_provider, /*max=*/COIN)};

auto assembler = BlockAssembler{chainstate, node, *static_cast<CTxMemPool*>(&tx_pool), chainstate.m_params, options};
auto block_template = assembler.CreateNewBlock(CScript{} << OP_TRUE);
Expand Down Expand Up @@ -140,7 +140,7 @@ FUZZ_TARGET(tx_pool_standard, .init = initialize_tx_pool)
// The sum of the values of all spendable outpoints
constexpr CAmount SUPPLY_TOTAL{COINBASE_MATURITY * 50 * COIN};

CTxMemPool tx_pool_{/* estimator */ nullptr, /* check_ratio */ 1};
CTxMemPool tx_pool_{/*estimator=*/nullptr, /*check_ratio=*/1};
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);

chainstate.SetMempool(&tx_pool);
Expand Down Expand Up @@ -276,10 +276,10 @@ FUZZ_TARGET(tx_pool_standard, .init = initialize_tx_pool)
// Outpoints that no longer count toward the total supply
std::set<COutPoint> consumed_supply;
for (const auto& removed_tx : removed) {
insert_tx(/* created_by_tx */ {consumed_erased}, /* consumed_by_tx */ {outpoints_supply}, /* tx */ *removed_tx);
insert_tx(/*created_by_tx=*/{consumed_erased}, /*consumed_by_tx=*/{outpoints_supply}, /*tx=*/*removed_tx);
}
for (const auto& added_tx : added) {
insert_tx(/* created_by_tx */ {outpoints_supply, outpoints_rbf}, /* consumed_by_tx */ {consumed_supply}, /* tx */ *added_tx);
insert_tx(/*created_by_tx=*/{outpoints_supply, outpoints_rbf}, /*consumed_by_tx=*/{consumed_supply}, /*tx=*/*added_tx);
}
for (const auto& p : consumed_erased) {
Assert(outpoints_supply.erase(p) == 1);
Expand Down Expand Up @@ -312,7 +312,7 @@ FUZZ_TARGET(tx_pool, .init = initialize_tx_pool)
txids.push_back(ConsumeUInt256(fuzzed_data_provider));
}

CTxMemPool tx_pool_{/* estimator */ nullptr, /* check_ratio */ 1};
CTxMemPool tx_pool_{/*estimator=*/nullptr, /*check_ratio=*/1};
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);

chainstate.SetMempool(&tx_pool);
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/utxo_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ FUZZ_TARGET(utxo_snapshot, .init = initialize_chain)
} catch (const std::ios_base::failure&) {
return false;
}
return chainman.ActivateSnapshot(infile, metadata, /* in_memory */ true);
return chainman.ActivateSnapshot(infile, metadata, /*in_memory=*/true);
}};

if (fuzzed_data_provider.ConsumeBool()) {
Expand Down
20 changes: 10 additions & 10 deletions src/test/mempool_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
//
// [tx1]
//
CTransactionRef tx1 = make_tx(/* output_values */ {10 * COIN});
CTransactionRef tx1 = make_tx(/*output_values=*/{10 * COIN});
pool.addUnchecked(entry.Fee(10000LL).FromTx(tx1));

// Ancestors / descendants should be 1 / 1 (itself / itself)
Expand All @@ -614,7 +614,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
//
// [tx1].0 <- [tx2]
//
CTransactionRef tx2 = make_tx(/* output_values */ {495 * CENT, 5 * COIN}, /* inputs */ {tx1});
CTransactionRef tx2 = make_tx(/*output_values=*/{495 * CENT, 5 * COIN}, /*inputs=*/{tx1});
pool.addUnchecked(entry.Fee(10000LL).FromTx(tx2));

// Ancestors / descendants should be:
Expand All @@ -633,7 +633,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
//
// [tx1].0 <- [tx2].0 <- [tx3]
//
CTransactionRef tx3 = make_tx(/* output_values */ {290 * CENT, 200 * CENT}, /* inputs */ {tx2});
CTransactionRef tx3 = make_tx(/*output_values=*/{290 * CENT, 200 * CENT}, /*inputs=*/{tx2});
pool.addUnchecked(entry.Fee(10000LL).FromTx(tx3));

// Ancestors / descendants should be:
Expand All @@ -658,7 +658,7 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
// |
// \---1 <- [tx4]
//
CTransactionRef tx4 = make_tx(/* output_values */ {290 * CENT, 250 * CENT}, /* inputs */ {tx2}, /* input_indices */ {1});
CTransactionRef tx4 = make_tx(/*output_values=*/{290 * CENT, 250 * CENT}, /*inputs=*/{tx2}, /*input_indices=*/{1});
pool.addUnchecked(entry.Fee(10000LL).FromTx(tx4));

// Ancestors / descendants should be:
Expand Down Expand Up @@ -694,14 +694,14 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
CAmount v = 5 * COIN;
for (uint64_t i = 0; i < 5; i++) {
CTransactionRef& tyi = *ty[i];
tyi = make_tx(/* output_values */ {v}, /* inputs */ i > 0 ? std::vector<CTransactionRef>{*ty[i - 1]} : std::vector<CTransactionRef>{});
tyi = make_tx(/*output_values=*/{v}, /*inputs=*/i > 0 ? std::vector<CTransactionRef>{*ty[i - 1]} : std::vector<CTransactionRef>{});
v -= 50 * CENT;
pool.addUnchecked(entry.Fee(10000LL).FromTx(tyi));
pool.GetTransactionAncestry(tyi->GetHash(), ancestors, descendants);
BOOST_CHECK_EQUAL(ancestors, i+1);
BOOST_CHECK_EQUAL(descendants, i+1);
}
CTransactionRef ty6 = make_tx(/* output_values */ {5 * COIN}, /* inputs */ {tx3, ty5});
CTransactionRef ty6 = make_tx(/*output_values=*/{5 * COIN}, /*inputs=*/{tx3, ty5});
pool.addUnchecked(entry.Fee(10000LL).FromTx(ty6));

// Ancestors / descendants should be:
Expand Down Expand Up @@ -755,10 +755,10 @@ BOOST_AUTO_TEST_CASE(MempoolAncestryTests)
// \---1 <- [tc].0 --<--/
//
CTransactionRef ta, tb, tc, td;
ta = make_tx(/* output_values */ {10 * COIN});
tb = make_tx(/* output_values */ {5 * COIN, 3 * COIN}, /* inputs */ {ta});
tc = make_tx(/* output_values */ {2 * COIN}, /* inputs */ {tb}, /* input_indices */ {1});
td = make_tx(/* output_values */ {6 * COIN}, /* inputs */ {tb, tc}, /* input_indices */ {0, 0});
ta = make_tx(/*output_values=*/{10 * COIN});
tb = make_tx(/*output_values=*/{5 * COIN, 3 * COIN}, /*inputs=*/ {ta});
tc = make_tx(/*output_values=*/{2 * COIN}, /*inputs=*/{tb}, /*input_indices=*/{1});
td = make_tx(/*output_values=*/{6 * COIN}, /*inputs=*/{tb, tc}, /*input_indices=*/{0, 0});
pool.clear();
pool.addUnchecked(entry.Fee(10000LL).FromTx(ta));
pool.addUnchecked(entry.Fee(10000LL).FromTx(tb));
Expand Down
Loading

0 comments on commit 2479413

Please sign in to comment.