aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_fee_estimation.py
diff options
context:
space:
mode:
authorRandall Naar <rnd.naar@gmail.com>2022-11-17 00:07:25 -0500
committerRandall Naar <rnd.naar@gmail.com>2022-11-17 00:11:08 -0500
commit6fb102c9f361a7ba0a6aa0a9b41315f5e04559f7 (patch)
treeacee4c1e99a516dada10702b88030220bd42cd76 /test/functional/feature_fee_estimation.py
parent6863ad79a65842504ab6f5584fac3d1de7ecf87e (diff)
downloadbitcoin-6fb102c9f361a7ba0a6aa0a9b41315f5e04559f7.tar.xz
test: Changed small_txpuzzle_randfee to return the virtual size instead of the transaction hex for feerate calculation.
Diffstat (limited to 'test/functional/feature_fee_estimation.py')
-rwxr-xr-xtest/functional/feature_fee_estimation.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/feature_fee_estimation.py b/test/functional/feature_fee_estimation.py
index b0cbcf4edf..0357a6f281 100755
--- a/test/functional/feature_fee_estimation.py
+++ b/test/functional/feature_fee_estimation.py
@@ -62,7 +62,7 @@ def small_txpuzzle_randfee(
unconflist.append({"txid": txid, "vout": 0, "value": total_in - amount - fee})
unconflist.append({"txid": txid, "vout": 1, "value": amount})
- return (tx.serialize().hex(), fee)
+ return (tx.get_vsize(), fee)
def check_raw_estimates(node, fees_seen):
@@ -158,7 +158,7 @@ class EstimateFeeTest(BitcoinTestFramework):
random.shuffle(self.confutxo)
for _ in range(random.randrange(100 - 50, 100 + 50)):
from_index = random.randint(1, 2)
- (txhex, fee) = small_txpuzzle_randfee(
+ (tx_bytes, fee) = small_txpuzzle_randfee(
self.wallet,
self.nodes[from_index],
self.confutxo,
@@ -167,7 +167,7 @@ class EstimateFeeTest(BitcoinTestFramework):
min_fee,
min_fee,
)
- tx_kbytes = (len(txhex) // 2) / 1000.0
+ tx_kbytes = tx_bytes / 1000.0
self.fees_per_kb.append(float(fee) / tx_kbytes)
self.sync_mempools(wait=0.1)
mined = mining_node.getblock(self.generate(mining_node, 1)[0], True)["tx"]