Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max / Rpc tx fee. #176

Merged
merged 5 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/node/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct NodeContext;
* 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};
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE{COIN * 100};

/**
* Submit a transaction to the mempool and (optionally) relay it to all P2P peers.
Expand Down
8 changes: 4 additions & 4 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2312,8 +2312,8 @@ static RPCHelpMan settxfee()
RPCResult::Type::BOOL, "", "Returns true if successful"
},
RPCExamples{
HelpExampleCli("settxfee", "0.00001")
+ HelpExampleRpc("settxfee", "0.00001")
HelpExampleCli("settxfee", "0.1")
+ HelpExampleRpc("settxfee", "0.1")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
Expand All @@ -2323,8 +2323,8 @@ static RPCHelpMan settxfee()
LOCK(pwallet->cs_wallet);

CAmount nAmount = AmountFromValue(request.params[0]);
CFeeRate tx_fee_rate(nAmount, 1000);
CFeeRate max_tx_fee_rate(pwallet->m_default_max_tx_fee, 1000);
CFeeRate tx_fee_rate(nAmount, 10000000);
CFeeRate max_tx_fee_rate(pwallet->m_default_max_tx_fee, 4294967295);
if (tx_fee_rate == CFeeRate(0)) {
// automatic selection
} else if (tx_fee_rate < pwallet->chain().relayMinFee()) {
Expand Down