Bitcoin Core  22.99.0
P2P Digital Currency
feebumper.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2020 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_WALLET_FEEBUMPER_H
6 #define BITCOIN_WALLET_FEEBUMPER_H
7 
9 
10 class uint256;
11 enum class FeeEstimateMode;
12 struct bilingual_str;
13 
14 namespace wallet {
15 class CCoinControl;
16 class CWallet;
17 class CWalletTx;
18 
19 namespace feebumper {
20 
21 enum class Result
22 {
23  OK,
28  MISC_ERROR,
29 };
30 
32 bool TransactionCanBeBumped(const CWallet& wallet, const uint256& txid);
33 
36  const uint256& txid,
37  const CCoinControl& coin_control,
38  std::vector<bilingual_str>& errors,
39  CAmount& old_fee,
40  CAmount& new_fee,
41  CMutableTransaction& mtx);
42 
47 
53  const uint256& txid,
54  CMutableTransaction&& mtx,
55  std::vector<bilingual_str>& errors,
56  uint256& bumped_txid);
57 
58 } // namespace feebumper
59 } // namespace wallet
60 
61 #endif // BITCOIN_WALLET_FEEBUMPER_H
wallet::feebumper::Result::INVALID_ADDRESS_OR_KEY
@ INVALID_ADDRESS_OR_KEY
transaction.h
bilingual_str
Bilingual messages:
Definition: translation.h:16
wallet::feebumper::Result
Result
Definition: feebumper.h:21
wallet
Definition: node.h:38
wallet::feebumper::TransactionCanBeBumped
bool TransactionCanBeBumped(const CWallet &wallet, const uint256 &txid)
Return whether transaction can be bumped.
Definition: feebumper.cpp:146
wallet::feebumper::Result::INVALID_PARAMETER
@ INVALID_PARAMETER
wallet::feebumper::CommitTransaction
Result CommitTransaction(CWallet &wallet, const uint256 &txid, CMutableTransaction &&mtx, std::vector< bilingual_str > &errors, uint256 &bumped_txid)
Commit the bumpfee transaction.
Definition: feebumper.cpp:251
wallet::feebumper::Result::WALLET_ERROR
@ WALLET_ERROR
wallet::CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:232
FeeEstimateMode
FeeEstimateMode
Definition: feerate.h:18
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
uint256
256-bit opaque blob.
Definition: uint256.h:126
wallet::feebumper::CreateRateBumpTransaction
Result CreateRateBumpTransaction(CWallet &wallet, const uint256 &txid, const CCoinControl &coin_control, std::vector< bilingual_str > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx)
Create bumpfee transaction based on feerate estimates.
Definition: feebumper.cpp:157
wallet::feebumper::SignTransaction
bool SignTransaction(CWallet &wallet, CMutableTransaction &mtx)
Sign the new transaction,.
Definition: feebumper.cpp:246
wallet::feebumper::Result::OK
@ OK
CMutableTransaction
A mutable version of CTransaction.
Definition: transaction.h:364
wallet::feebumper::Result::MISC_ERROR
@ MISC_ERROR
wallet::feebumper::Result::INVALID_REQUEST
@ INVALID_REQUEST
wallet::CCoinControl
Coin Control Features.
Definition: coincontrol.h:29