Bitcoin Core  21.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 CWallet;
11 class CWalletTx;
12 class uint256;
13 class CCoinControl;
14 enum class FeeEstimateMode;
15 struct bilingual_str;
16 
17 namespace feebumper {
18 
19 enum class Result
20 {
21  OK,
26  MISC_ERROR,
27 };
28 
30 bool TransactionCanBeBumped(const CWallet& wallet, const uint256& txid);
31 
34  const uint256& txid,
35  const CCoinControl& coin_control,
36  std::vector<bilingual_str>& errors,
37  CAmount& old_fee,
38  CAmount& new_fee,
39  CMutableTransaction& mtx);
40 
45 
51  const uint256& txid,
52  CMutableTransaction&& mtx,
53  std::vector<bilingual_str>& errors,
54  uint256& bumped_txid);
55 
56 } // namespace feebumper
57 
58 #endif // BITCOIN_WALLET_FEEBUMPER_H
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:154
transaction.h
feebumper::Result
Result
Definition: feebumper.h:19
bilingual_str
Bilingual messages:
Definition: translation.h:16
CCoinControl
Coin Control Features.
Definition: coincontrol.h:23
wallet
Definition: interfaces.cpp:47
feebumper::Result::INVALID_ADDRESS_OR_KEY
@ INVALID_ADDRESS_OR_KEY
feebumper
Definition: feebumper.cpp:141
feebumper::SignTransaction
bool SignTransaction(CWallet &wallet, CMutableTransaction &mtx)
Sign the new transaction,.
Definition: feebumper.cpp:243
FeeEstimateMode
FeeEstimateMode
Definition: feerate.h:18
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
feebumper::TransactionCanBeBumped
bool TransactionCanBeBumped(const CWallet &wallet, const uint256 &txid)
Return whether transaction can be bumped.
Definition: feebumper.cpp:143
uint256
256-bit opaque blob.
Definition: uint256.h:124
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:248
feebumper::Result::MISC_ERROR
@ MISC_ERROR
feebumper::Result::INVALID_REQUEST
@ INVALID_REQUEST
CWallet
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:225
CWalletTx
A transaction with a bunch of additional info that only the owner cares about.
Definition: transaction.h:68
feebumper::Result::INVALID_PARAMETER
@ INVALID_PARAMETER
CMutableTransaction
A mutable version of CTransaction.
Definition: transaction.h:344
feebumper::Result::WALLET_ERROR
@ WALLET_ERROR
feebumper::Result::OK
@ OK