@@ -62,7 +62,7 @@ def small_txpuzzle_randfee(
62
62
unconflist .append ({"txid" : txid , "vout" : 0 , "value" : total_in - amount - fee })
63
63
unconflist .append ({"txid" : txid , "vout" : 1 , "value" : amount })
64
64
65
- return (tx .serialize (). hex (), fee )
65
+ return (tx .get_vsize (), fee )
66
66
67
67
68
68
def check_raw_estimates (node , fees_seen ):
@@ -158,7 +158,7 @@ def transact_and_mine(self, numblocks, mining_node):
158
158
random .shuffle (self .confutxo )
159
159
for _ in range (random .randrange (100 - 50 , 100 + 50 )):
160
160
from_index = random .randint (1 , 2 )
161
- (txhex , fee ) = small_txpuzzle_randfee (
161
+ (tx_bytes , fee ) = small_txpuzzle_randfee (
162
162
self .wallet ,
163
163
self .nodes [from_index ],
164
164
self .confutxo ,
@@ -167,7 +167,7 @@ def transact_and_mine(self, numblocks, mining_node):
167
167
min_fee ,
168
168
min_fee ,
169
169
)
170
- tx_kbytes = ( len ( txhex ) // 2 ) / 1000.0
170
+ tx_kbytes = tx_bytes / 1000.0
171
171
self .fees_per_kb .append (float (fee ) / tx_kbytes )
172
172
self .sync_mempools (wait = 0.1 )
173
173
mined = mining_node .getblock (self .generate (mining_node , 1 )[0 ], True )["tx" ]
0 commit comments