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

Add checks for settxfee reasonableness #13988

Merged
merged 2 commits into from Aug 22, 2018
Merged

Conversation

@ajtowns
Copy link
Contributor

@ajtowns ajtowns commented Aug 16, 2018

When using the settxfee RPC, the value is silently ignored if it is less than either than minrelaytxfee or the wallet's mintxfee. This adds an error response if that's going to happen, but still allows "settxfee 0" to deliberately default to the minimum value.

@DrahtBot
Copy link
Contributor

@DrahtBot DrahtBot commented Aug 16, 2018

No more conflicts as of last run.

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Aug 16, 2018

utACK 48618da

Copy link
Member

@promag promag left a comment

Concept ACK, could add tests?

// automatic selection
} else if (tx_fee_rate < ::minRelayTxFee) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("txfee cannot be less than min relay tx fee (%s)", ::minRelayTxFee.ToString()));
} else if (tx_fee_rate < pwallet->m_min_fee) {
Copy link
Member

@promag promag Aug 20, 2018

How about check this first?

@promag
Copy link
Member

@promag promag commented Aug 20, 2018

@ajtowns feel free to pick or squash ad367e1.

@laanwj
Copy link
Member

@laanwj laanwj commented Aug 22, 2018

utACK 317f2cb
(thanks @promag for adding tests!)

@laanwj laanwj merged commit 317f2cb into bitcoin:master Aug 22, 2018
2 checks passed
laanwj added a commit that referenced this issue Aug 22, 2018
317f2cb test: Check RPC settxfee errors (João Barbosa)
48618da Add checks for settxfee reasonableness (Anthony Towns)

Pull request description:

  When using the `settxfee` RPC, the value is silently ignored if it is less than either than minrelaytxfee or the wallet's mintxfee. This adds an error response if that's going to happen, but still allows "settxfee 0" to deliberately default to the minimum value.

Tree-SHA512: ce685584cf8d6b9ca2cc97196d494220e3892b6a804a458086e04b3a23df281da432ad0a3053106a064c90c541ddb6f6b96a27cf8376d45af1e44449baf88456
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this issue Jan 13, 2020
Summary:
317f2cb3f4499afbaa63e3cac80567744f12c95b test: Check RPC settxfee errors (João Barbosa)
48618daf262b84c2e2f7322b5ca14375d7d68b64 Add checks for settxfee reasonableness (Anthony Towns)

Pull request description:

  When using the `settxfee` RPC, the value is silently ignored if it is less than either than minrelaytxfee or the wallet's mintxfee. This adds an error response if that's going to happen, but still allows "settxfee 0" to deliberately default to the minimum value.

Tree-SHA512: ce685584cf8d6b9ca2cc97196d494220e3892b6a804a458086e04b3a23df281da432ad0a3053106a064c90c541ddb6f6b96a27cf8376d45af1e44449baf88456

Backport of Core PR13988
bitcoin/bitcoin#13988

Note: we don't have a `wallet_bumpfee.py` test, so the second commit (bitcoin/bitcoin@317f2cb) was added to `rpc_estimatefee.py` because it seemed to be the most closely related test

Test Plan:
  make check
  test_runner.py rpc_estimatefee

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D4894
5tefan added a commit to 5tefan/dash that referenced this issue Jul 29, 2021
317f2cb test: Check RPC settxfee errors
            (João Barbosa)
48618da Add checks for settxfee
            reasonableness (Anthony Towns)

Pull request description:

  When using the `settxfee` RPC, the value is silently ignored if it
is less than either than minrelaytxfee or the wallet's mintxfee. This
adds an error response if that's going to happen, but still allows
"settxfee 0" to deliberately default to the minimum value.
UdjinM6 pushed a commit to dashpay/dash that referenced this issue Jul 29, 2021
317f2cb test: Check RPC settxfee errors
            (João Barbosa)
48618da Add checks for settxfee
            reasonableness (Anthony Towns)

Pull request description:

  When using the `settxfee` RPC, the value is silently ignored if it
is less than either than minrelaytxfee or the wallet's mintxfee. This
adds an error response if that's going to happen, but still allows
"settxfee 0" to deliberately default to the minimum value.
Munkybooty added a commit to Munkybooty/dash that referenced this issue Aug 3, 2021
…4301)

317f2cb test: Check RPC settxfee errors
            (João Barbosa)
48618da Add checks for settxfee
            reasonableness (Anthony Towns)

Pull request description:

  When using the `settxfee` RPC, the value is silently ignored if it
is less than either than minrelaytxfee or the wallet's mintxfee. This
adds an error response if that's going to happen, but still allows
"settxfee 0" to deliberately default to the minimum value.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants