Skip to content

Conversation

@stickies-v
Copy link
Contributor

Addresses #29283 (comment).

Fixes a JSONRPCException: Invalid amount (-3) exception by ensuring the amount sent to sendtoaddress is rounded to 8 decimals.

See https://cirrus-ci.com/task/5562947183837184?logs=ci#L2559

Note: since round can also round down, min_amount is not exactly guaranteed, but this is not a problem for the current usage. I've added a docstring to highlight this.

Fixes a `JSONRPCException: Invalid amount (-3)` exception by
ensuring the amount sent to `sendtoaddress` is rounded to 8
decimals.

See https://cirrus-ci.com/task/5562947183837184?logs=ci#L2559
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 29, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK sr-gi

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Copy link
Member

@sr-gi sr-gi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 26ad2ae

I found this and got to a similar patch independently

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@fanquake fanquake merged commit 11b436a into bitcoin:master Jan 31, 2024
@bitcoin bitcoin locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants