13#include <boost/test/unit_test.hpp>
41 BOOST_CHECK_EQUAL(tx->vout[0].nValue, recipient.nAmount + leftover_input_amount - fee);
42 BOOST_CHECK_GT(fee, 0);
int64_t CAmount
Amount in satoshis (Can be negative)
static constexpr CAmount COIN
The amount of satoshis in one BTC.
std::optional< OutputType > m_change_type
Override the default change type if set, ignored if destChange is set.
std::optional< CFeeRate > m_feerate
Override the wallet's m_pay_tx_fee if set.
bool fOverrideFeeRate
Override automatic min/max checks on fee, m_feerate must be set if true.
BOOST_AUTO_TEST_SUITE_END()
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK_EQUAL(v1, v2)
#define BOOST_CHECK(expr)
std::shared_ptr< const CTransaction > CTransactionRef
bool CreateTransaction(CWallet &wallet, const std::vector< CRecipient > &vecSend, CTransactionRef &tx, CAmount &nFeeRet, int &nChangePosInOut, bilingual_str &error, const CCoinControl &coin_control, FeeCalculation &fee_calc_out, bool sign)
Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also cr...
BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup)
CScript GetScriptForRawPubKey(const CPubKey &pubKey)
Generate a P2PK script for the given pubkey.
std::unique_ptr< ChainstateManager > chainman
std::unique_ptr< interfaces::Chain > chain
Testing fixture that pre-creates a 100-block REGTEST-mode block chain.
Testing setup and teardown for wallet.
bool error(const char *fmt, const Args &... args)
std::unique_ptr< CWallet > CreateSyncedWallet(interfaces::Chain &chain, CChain &cchain, const CKey &key)