HomePhabricator

tests: fix a few misuses of Decimal

Description

tests: fix a few misuses of Decimal

Summary:

  • In abc_rpc_avalancheproof.py, dust_amount was unneccesarily converted from a string to string via a Decimal. Use the string directly.
  • In rpc_fundrawtransaction.py, use quote around the float value, to avoid loss of precision caused by intermediate float storage.
  • In wallet_send.py, the tx size is an integer. Just use an integer division instead of creating an intermediate float and a Decimal.

Changes related to D10599

Test Plan: ninja check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10613

Details

Provenance
PiRKAuthored on Dec 2 2021, 07:45
PiRKPushed on Dec 6 2021, 14:19
Reviewer
Restricted Project
Differential Revision
D10613: tests: fix a few misuses of Decimal
Parents
rABC9c9c2e26f77a: Use decimal objects for fees in mempool_accept.py
Branches
Unknown
Tags
Unknown