Skip to content

Commit 1d05a9d

Browse files
committed
Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h
So it can be used in the GUI.
1 parent 86e22d2 commit 1d05a9d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/node/transaction.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
#define BITCOIN_NODE_TRANSACTION_H
77

88
#include <attributes.h>
9+
#include <policy/feerate.h>
910
#include <primitives/transaction.h>
1011
#include <util/error.h>
1112

1213
struct NodeContext;
1314

15+
/** Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.
16+
* Also used by the GUI when broadcasting a completed PSBT.
17+
* By default, a transaction with a fee rate higher than this will be rejected
18+
* by these RPCs and the GUI. This can be overridden with the maxfeerate argument.
19+
*/
20+
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE{COIN / 10};
21+
1422
/**
1523
* Submit a transaction to the mempool and (optionally) relay it to all P2P peers.
1624
*

src/rpc/rawtransaction.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@
3939

4040
#include <univalue.h>
4141

42-
/** Maximum fee rate for sendrawtransaction and testmempoolaccept.
43-
* By default, a transaction with a fee rate higher than this will be rejected
44-
* by the RPCs. This can be overridden with the maxfeerate argument.
45-
*/
46-
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE{COIN / 10};
47-
4842
static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
4943
{
5044
// Call into TxToUniv() in bitcoin-common to decode the transaction hex.

0 commit comments

Comments
 (0)