Bitcoin
feebumper.h
Go to the documentation of this file.
1 // Copyright (c) 2017-2019 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 
16 namespace feebumper {
17 
18 enum class Result
19 {
20  OK,
25  MISC_ERROR,
26 };
27 
29 bool TransactionCanBeBumped(const CWallet* wallet, const uint256& txid);
30 
33  const uint256& txid,
34  const CCoinControl& coin_control,
35  CAmount total_fee,
36  std::vector<std::string>& errors,
37  CAmount& old_fee,
38  CAmount& new_fee,
39  CMutableTransaction& mtx);
40 
43  const uint256& txid,
44  const CCoinControl& coin_control,
45  std::vector<std::string>& errors,
46  CAmount& old_fee,
47  CAmount& new_fee,
48  CMutableTransaction& mtx);
49 
53 bool SignTransaction(CWallet* wallet, CMutableTransaction& mtx);
54 
60  const uint256& txid,
61  CMutableTransaction&& mtx,
62  std::vector<std::string>& errors,
63  uint256& bumped_txid);
64 
65 } // namespace feebumper
66 
67 #endif // BITCOIN_WALLET_FEEBUMPER_H
Definition: transaction.h:366
Definition: wallet.h:724
Definition: feebumper.cpp:60
FeeEstimateMode
Definition: fees.h:49
Definition: coincontrol.h:16
int64_t CAmount
Definition: amount.h:12
bool SignTransaction(CWallet *wallet, CMutableTransaction &mtx)
Definition: feebumper.cpp:302
Result CreateTotalBumpTransaction(const CWallet *wallet, const uint256 &txid, const CCoinControl &coin_control, CAmount total_fee, std::vector< std::string > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx)
Create bumpfee transaction based on total amount.
Definition: feebumper.cpp:74
Definition: wallet.h:453
Result CreateRateBumpTransaction(CWallet *wallet, const uint256 &txid, const CCoinControl &coin_control, std::vector< std::string > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx)
Create bumpfee transaction based on feerate estimates.
Definition: feebumper.cpp:199
bool TransactionCanBeBumped(const CWallet *wallet, const uint256 &txid)
Return whether transaction can be bumped.
Definition: feebumper.cpp:62
Definition: uint256.h:121
Result CommitTransaction(CWallet *wallet, const uint256 &txid, CMutableTransaction &&mtx, std::vector< std::string > &errors, uint256 &bumped_txid)
Definition: feebumper.cpp:308
Result
Definition: feebumper.h:18