Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h

So it can be used in the GUI.
This commit is contained in:
Sjors Provoost 2020-03-26 11:20:15 +01:00
parent 86e22d23bb
commit 1d05a9d80b
No known key found for this signature in database
GPG key ID: 57FF9BDBCC301009
2 changed files with 8 additions and 6 deletions

View file

@ -6,11 +6,19 @@
#define BITCOIN_NODE_TRANSACTION_H
#include <attributes.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <util/error.h>
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.
*

View file

@ -39,12 +39,6 @@
#include <univalue.h>
/** 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.