Changeset View
Changeset View
Standalone View
Standalone View
src/test/txpackage_tests.cpp
| Show First 20 Lines • Show All 615 Lines • ▼ Show 20 Lines | auto mtx_parent2 = CreateValidMempoolTransaction( | ||||
| /*input_transaction=*/m_coinbase_txns[3], /*input_vout=*/0, | /*input_transaction=*/m_coinbase_txns[3], /*input_vout=*/0, | ||||
| /*input_height=*/0, /*input_signing_key=*/coinbaseKey, | /*input_height=*/0, /*input_signing_key=*/coinbaseKey, | ||||
| /*output_destination=*/acs_spk, | /*output_destination=*/acs_spk, | ||||
| /*output_amount=*/Amount{50 * COIN - low_fee_amt}, /*submit=*/false); | /*output_amount=*/Amount{50 * COIN - low_fee_amt}, /*submit=*/false); | ||||
| CTransactionRef ptx_parent2 = MakeTransactionRef(mtx_parent2); | CTransactionRef ptx_parent2 = MakeTransactionRef(mtx_parent2); | ||||
| package_mixed.push_back(ptx_parent2); | package_mixed.push_back(ptx_parent2); | ||||
| BOOST_CHECK(m_node.mempool->GetMinFee().GetFee( | BOOST_CHECK(m_node.mempool->GetMinFee().GetFee( | ||||
| GetVirtualTransactionSize(*ptx_parent2)) > low_fee_amt); | GetVirtualTransactionSize(*ptx_parent2)) > low_fee_amt); | ||||
| BOOST_CHECK(m_node.mempool->m_min_relay_feerate.GetFee( | BOOST_CHECK(m_node.mempool->m_opts.min_relay_feerate.GetFee( | ||||
| GetVirtualTransactionSize(*ptx_parent2)) <= low_fee_amt); | GetVirtualTransactionSize(*ptx_parent2)) <= low_fee_amt); | ||||
| // child spends parent1 and parent2 | // child spends parent1 and parent2 | ||||
| CKey mixed_grandchild_key; | CKey mixed_grandchild_key; | ||||
| mixed_grandchild_key.MakeNewKey(true); | mixed_grandchild_key.MakeNewKey(true); | ||||
| CScript mixed_child_spk = | CScript mixed_child_spk = | ||||
| GetScriptForDestination(PKHash(mixed_grandchild_key.GetPubKey())); | GetScriptForDestination(PKHash(mixed_grandchild_key.GetPubKey())); | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | auto mtx_parent_cheap = CreateValidMempoolTransaction( | ||||
| /*input_transaction=*/m_coinbase_txns[1], /*input_vout=*/0, | /*input_transaction=*/m_coinbase_txns[1], /*input_vout=*/0, | ||||
| /*input_height=*/0, /*input_signing_key=*/coinbaseKey, | /*input_height=*/0, /*input_signing_key=*/coinbaseKey, | ||||
| /*output_destination=*/parent_spk, | /*output_destination=*/parent_spk, | ||||
| /*output_amount=*/coinbase_value - parent_fee, /*submit=*/false); | /*output_amount=*/coinbase_value - parent_fee, /*submit=*/false); | ||||
| CTransactionRef tx_parent_cheap = MakeTransactionRef(mtx_parent_cheap); | CTransactionRef tx_parent_cheap = MakeTransactionRef(mtx_parent_cheap); | ||||
| package_still_too_low.push_back(tx_parent_cheap); | package_still_too_low.push_back(tx_parent_cheap); | ||||
| BOOST_CHECK(m_node.mempool->GetMinFee().GetFee( | BOOST_CHECK(m_node.mempool->GetMinFee().GetFee( | ||||
| GetVirtualTransactionSize(*tx_parent_cheap)) > parent_fee); | GetVirtualTransactionSize(*tx_parent_cheap)) > parent_fee); | ||||
| BOOST_CHECK(m_node.mempool->m_min_relay_feerate.GetFee( | BOOST_CHECK(m_node.mempool->m_opts.min_relay_feerate.GetFee( | ||||
| GetVirtualTransactionSize(*tx_parent_cheap)) <= parent_fee); | GetVirtualTransactionSize(*tx_parent_cheap)) <= parent_fee); | ||||
| auto mtx_child_cheap = CreateValidMempoolTransaction( | auto mtx_child_cheap = CreateValidMempoolTransaction( | ||||
| /*input_transaction=*/tx_parent_cheap, /*input_vout=*/0, | /*input_transaction=*/tx_parent_cheap, /*input_vout=*/0, | ||||
| /*input_height=*/101, /* input_signing_key */ child_key, | /*input_height=*/101, /* input_signing_key */ child_key, | ||||
| /*output_destination=*/child_spk, | /*output_destination=*/child_spk, | ||||
| /*output_amount=*/coinbase_value - parent_fee - child_fee, | /*output_amount=*/coinbase_value - parent_fee - child_fee, | ||||
| /*submit=*/false); | /*submit=*/false); | ||||
| ▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines | |||||