Skip to content

Conversation

jonatack
Copy link
Member

  • Improve/close gaps in existing test coverage before making the change
  • Enable passing decimals to ParseFixedPoint() when calling AmountFromValue()
  • Limit explicit fee rates in sat/vB passed in by users to 3 decimals, and raise otherwise
  • Add regression test coverage

Closes #20534.

@maflcko
Copy link
Member

maflcko commented Apr 27, 2021

Concept ACK

@DrahtBot
Copy link
Contributor

DrahtBot commented Apr 27, 2021

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@jonatack
Copy link
Member Author

jonatack commented May 5, 2021

rebased

@jonatack jonatack force-pushed the ensure-sat-vb-feerates-are-in-range branch from a224f52 to 9c7b474 Compare May 6, 2021 07:06
@jonatack
Copy link
Member Author

jonatack commented May 6, 2021

Rebased for CI fix on master.

@meshcollider
Copy link
Contributor

Concept ACK

Copy link
Contributor

@fjahr fjahr left a comment

Choose a reason for hiding this comment

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

Code review ACK 9c7b474

modulo I think those two tests mentioned below can be removed now.

@jonatack jonatack force-pushed the ensure-sat-vb-feerates-are-in-range branch from 9c7b474 to 847288d Compare May 9, 2021 10:51
@jonatack
Copy link
Member Author

jonatack commented May 9, 2021

Thank you @fjahr, updated with your feedback: git diff 9c7b474 847288d

@fjahr
Copy link
Contributor

fjahr commented May 9, 2021

Code review ACK 9c7b474

The only change was the removal of two now redundant/duplicate tests.

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.

review ACK 847288d 🔷

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

review ACK 847288df07b45ca535c849e518b22818ab492896 🔷
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUjgOAv/U64jIK5O7lauqHgzSxVR8ARVhocyv95mL70s0DRDSUXyWeNjsQAbqq4d
d/Frd1URcN+ui/wiGAvzW7JjgPxdFBfUpcUZCh6uVwzMYIi5JfzDpVVC1Fa/S9PG
Wcvi14s/N7wWMEYRE85WMncceEyCAb5NP6/Pnr8zY3/jdMT+NGZv+OvIkNgpxpFt
CP9iMkX5GFuHOJnFc53PNAvvuGnoDE/jGWDk7X48Q8EScNgwKnk16K7vNDbarKb2
szmXO2H+ql7moWoTBK0xDr/X2GEdZw+49nr1aP11pxBAIbgk0T/PweW6HQlnKaQ4
Ys/mVrSS18laMZkK2LvOgHQynSHmwwUyekcCzaxNWkRP2Si17bIwWlCCswPL4L1Z
qgWDQomJ2eJoYUBJMFwxTe0ZqVlRNEQA3ah5dv9qmImo9Qezf28E5fHeZ/OmHiEo
dBECvDU5QZlwFsUZ94kRY7t0/8E+5yGDESsmYV3120BkOYLcGx+OARlT0YZcyRaz
7SjbaQL7
=gqY6
-----END PGP SIGNATURE-----

Timestamp of file with hash 8b19ebaa4f993d9f7f5a3cd958924c1f48d2c00e94f5d00a4b4b7012058dc816 -

assert_fee_amount(result6['fee'], count_bytes(result6['hex']), 0)

# Test that funding non-standard "zero-fee" transactions is valid.
for param, zero_value in product(["fee_rate", "feeRate"], [0, 0.000, 0.00000000, "0", "0.000", "0.00000000"]):
Copy link
Member

@maflcko maflcko May 10, 2021

Choose a reason for hiding this comment

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

There should be no difference in python between 0., and .0, or any other combination that appends zeros to any side of either of them.

@maflcko maflcko merged commit adf7843 into bitcoin:master May 10, 2021
@jonatack jonatack deleted the ensure-sat-vb-feerates-are-in-range branch May 10, 2021 07:18
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 10, 2021
gwillen pushed a commit to ElementsProject/elements that referenced this pull request Jun 1, 2022
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sat/b values aren't validated to be in-range
5 participants