From 1d05a9d80b1211b47af465ba6958b0ec5a8c33ab Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Thu, 26 Mar 2020 11:20:15 +0100 Subject: [PATCH] Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h So it can be used in the GUI. --- src/node/transaction.h | 8 ++++++++ src/rpc/rawtransaction.cpp | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/node/transaction.h b/src/node/transaction.h index a85dfb8ace..649625ded1 100644 --- a/src/node/transaction.h +++ b/src/node/transaction.h @@ -6,11 +6,19 @@ #define BITCOIN_NODE_TRANSACTION_H #include +#include #include #include struct NodeContext; +/** Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls. + * Also used by the GUI when broadcasting a completed PSBT. + * By default, a transaction with a fee rate higher than this will be rejected + * by these RPCs and the GUI. This can be overridden with the maxfeerate argument. + */ +static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE{COIN / 10}; + /** * Submit a transaction to the mempool and (optionally) relay it to all P2P peers. * diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 37e515ddfe..c0e42356c1 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -39,12 +39,6 @@ #include -/** Maximum fee rate for sendrawtransaction and testmempoolaccept. - * By default, a transaction with a fee rate higher than this will be rejected - * by the RPCs. This can be overridden with the maxfeerate argument. - */ -static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE{COIN / 10}; - static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry) { // Call into TxToUniv() in bitcoin-common to decode the transaction hex.