[test] undo truncation of digits in btc amount #20164

pull zkriyaa wants to merge 2 commits into bitcoin:master from zkriyaa:rpc-testmempoolaccept-fee changing 1 files +1 −1
  1. zkriyaa commented at 3:38 AM on October 16, 2020: none
    • Undo truncation of decimal places of btc amount when calculating fee_expected as per this comment: #19940 (comment)

    • Converted fee_expected to Decimal as per this comment: #19940 (comment)

  2. [test] undo truncation of digits in btc amount 989af3c5c1
  3. fanquake added the label Tests on Oct 16, 2020
  4. [test] fixes incorrect spacing e82f9c0ad2
  5. in test/functional/mempool_accept.py:108 in 989af3c5c1 outdated
     104 | @@ -105,7 +105,7 @@ def run_test(self):
     105 |              locktime=node.getblockcount() + 2000,  # Can be anything
     106 |          ))['hex']
     107 |          tx.deserialize(BytesIO(hex_str_to_bytes(raw_tx_final)))
     108 | -        fee_expected = int(coin['amount']) - output_amount
     109 | +        fee_expected = Decimal(str(coin['amount']) )- Decimal(str(output_amount))
    


    kallewoof commented at 3:57 AM on October 16, 2020:

    Odd spacing. Try to adapt the style around you (i.e. spaces before and after -, no space between ) and ), ...


    zkriyaa commented at 4:27 AM on October 16, 2020:

    Thank you @kallewoof. I'll be careful about styling from now on.

  6. fanquake commented at 4:27 AM on October 16, 2020: member

    Thanks for the contribution, however it looks like this is already being taken care of as part of #20039 (which is more extensive).

  7. fanquake commented at 6:27 AM on October 16, 2020: member

    Closing this in favour of #20039. @riyasingh0799 maybe you'd like to help review that PR instead?

  8. fanquake closed this on Oct 16, 2020

  9. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-28 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me