Skip to content

Commit

Permalink
Move DEFAULT_MAX_RAW_TX_FEE_RATE to node/transaction.h
Browse files Browse the repository at this point in the history
So it can be used in the GUI.
  • Loading branch information
Sjors committed Mar 27, 2020
1 parent 86e22d2 commit 1d05a9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 8 additions & 0 deletions src/node/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
6 changes: 0 additions & 6 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1d05a9d

Please sign in to comment.