@@ -62,7 +62,7 @@ def small_txpuzzle_randfee(
6262 unconflist .append ({"txid" : txid , "vout" : 0 , "value" : total_in - amount - fee })
6363 unconflist .append ({"txid" : txid , "vout" : 1 , "value" : amount })
6464
65- return (tx .serialize (). hex (), fee )
65+ return (tx .get_vsize (), fee )
6666
6767
6868def check_raw_estimates (node , fees_seen ):
@@ -158,7 +158,7 @@ def transact_and_mine(self, numblocks, mining_node):
158158 random .shuffle (self .confutxo )
159159 for _ in range (random .randrange (100 - 50 , 100 + 50 )):
160160 from_index = random .randint (1 , 2 )
161- (txhex , fee ) = small_txpuzzle_randfee (
161+ (tx_bytes , fee ) = small_txpuzzle_randfee (
162162 self .wallet ,
163163 self .nodes [from_index ],
164164 self .confutxo ,
@@ -167,7 +167,7 @@ def transact_and_mine(self, numblocks, mining_node):
167167 min_fee ,
168168 min_fee ,
169169 )
170- tx_kbytes = ( len ( txhex ) // 2 ) / 1000.0
170+ tx_kbytes = tx_bytes / 1000.0
171171 self .fees_per_kb .append (float (fee ) / tx_kbytes )
172172 self .sync_mempools (wait = 0.1 )
173173 mined = mining_node .getblock (self .generate (mining_node , 1 )[0 ], True )["tx" ]
0 commit comments