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

Conversation

Projects
None yet
6 participants
@ajtowns
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Aug 16, 2018

No more conflicts as of last run.
@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Aug 16, 2018

utACK 48618da

@promag
Copy link
Member

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) {

This comment has been minimized.

Copy link
@promag

promag Aug 20, 2018

Member

How about check this first?

@promag

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

@ajtowns feel free to pick or squash ad367e1.

@laanwj

This comment has been minimized.

Copy link
Member

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

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Aug 22, 2018

Merge #13988: Add checks for settxfee reasonableness
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.