elements/test/functional/test_framework
Andrew Chow 2c72896bb3 tests: Calculate fees more similarly to CFeeRate::GetFee
Because of floating point precision issues, not all of the rounding done
is always correct. To fix this, the fee calculation for
assert_fee_amount is changed to better reflect how CFeeRate::GetFee does
it.

First the feerate is converted to an int representing sat/kvb. Then this
is multiplied by the transaction size, divivided by 1000, and rounded up
to the nearest sat. The result is then converted back to BTC (divided by
1e8) and then rounded down to the nearest sat to avoid precision errors.

Github-Pull: #22949
Rebased-From: 80dc829be7
(cherry picked from commit c768bfa08af034c744402d4294cc323d653b97b8)
2022-12-07 11:11:30 +00:00
..
__init__.py
address.py ci: various linter / CI compiler error fixes 2021-03-26 17:33:04 +00:00
authproxy.py test: retry when write to a socket fails on macOS 2020-06-25 17:26:20 +07:00
bdb.py test: remove unnecessary assignment in bdb 2021-02-09 10:22:50 -03:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blocktools.py Merge 9a154599fe into merged_master (Elements PR ElementsProject/elements#900) 2021-09-04 19:34:14 +00:00
coverage.py
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
key.py Merge feee029d29 into merged_master (Elements PR ElementsProject/elements#1020) 2021-09-05 13:42:34 +00:00
liquid_addr.py fix len check in blech32 decode() in test framework 2019-09-13 20:24:23 +05:00
messages.py Merge 2dda79cf61 into merged_master (Elements PR ElementsProject/elements#1094) 2022-04-21 15:54:34 -07:00
muhash.py test: Change MuHash Python implementation to match cpp version again 2020-12-22 01:48:34 +01:00
netutil.py test: Fix IPv6 check on BSD systems 2021-05-30 23:47:50 +02:00
p2p.py Merge bc0494cc39 into merged_master (Elements PR ElementsProject/elements#1040) 2021-09-18 14:58:14 +00:00
ripemd160.py Add pure Python RIPEMD-160 2022-09-07 14:13:13 +00:00
script.py Swap out hashlib.ripemd160 for own implementation 2022-09-07 14:13:27 +00:00
script_util.py scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-08-17 22:32:47 +00:00
siphash.py
socks5.py
test_framework.py Merge 672870ab7b into merged_master (Bitcoin PR bitcoin/bitcoin#22201) 2021-07-28 04:50:06 +00:00
test_node.py Merge e4487fd5bb into merged_master (Bitcoin PR bitcoin/bitcoin#22096) 2021-08-03 15:17:22 +00:00
test_shell.py TestShell: Return self from setup() 2019-11-05 12:55:52 +01:00
util.py tests: Calculate fees more similarly to CFeeRate::GetFee 2022-12-07 11:11:30 +00:00
wallet.py Merge 74013641e0 into merged_master (Bitcoin PR bitcoin/bitcoin#22089) 2021-07-28 03:33:26 +00:00
wallet_util.py Merge d1e4c56309 into merged_master (Bitcoin PR bitcoin/bitcoin#22363) 2021-07-31 15:28:34 +00:00