Bitcoin Core  0.20.99
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 
44 bool SignTransaction(CWallet& wallet, CMutableTransaction& mtx);
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
bool SignTransaction(CWallet &wallet, CMutableTransaction &mtx)
Sign the new transaction,.
Definition: feebumper.cpp:243
Bilingual messages:
Definition: translation.h:16
Coin Control Features.
Definition: coincontrol.h:22
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
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
bool TransactionCanBeBumped(const CWallet &wallet, const uint256 &txid)
Return whether transaction can be bumped.
Definition: feebumper.cpp:143
FeeEstimateMode
Definition: feerate.h:18
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:270
256-bit opaque blob.
Definition: uint256.h:124
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
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:622
A mutable version of CTransaction.
Definition: transaction.h:353