@@ -39,13 +39,15 @@ func TestBuildBlockBasic(t *testing.T) {
39
39
defer env .ctx .Lock .Unlock ()
40
40
41
41
// Create a valid transaction
42
- builder , signer := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
42
+ builder , signer , feeCalc , err := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
43
+ require .NoError (err )
43
44
utx , err := builder .NewCreateChainTx (
44
45
testSubnet1 .ID (),
45
46
nil ,
46
47
constants .AVMID ,
47
48
nil ,
48
49
"chain name" ,
50
+ feeCalc ,
49
51
)
50
52
require .NoError (err )
51
53
tx , err := walletsigner .SignUnsigned (context .Background (), signer , utx )
@@ -111,7 +113,8 @@ func TestBuildBlockShouldReward(t *testing.T) {
111
113
require .NoError (err )
112
114
113
115
// Create a valid [AddPermissionlessValidatorTx]
114
- builder , txSigner := env .factory .NewWallet (preFundedKeys [0 ])
116
+ builder , txSigner , feeCalc , err := env .factory .NewWallet (preFundedKeys [0 ])
117
+ require .NoError (err )
115
118
utx , err := builder .NewAddPermissionlessValidatorTx (
116
119
& txs.SubnetValidator {
117
120
Validator : txs.Validator {
@@ -133,6 +136,7 @@ func TestBuildBlockShouldReward(t *testing.T) {
133
136
Addrs : []ids.ShortID {preFundedKeys [0 ].PublicKey ().Address ()},
134
137
},
135
138
reward .PercentDenominator ,
139
+ feeCalc ,
136
140
common .WithChangeOwner (& secp256k1fx.OutputOwners {
137
141
Threshold : 1 ,
138
142
Addrs : []ids.ShortID {preFundedKeys [0 ].PublicKey ().Address ()},
@@ -251,13 +255,15 @@ func TestBuildBlockForceAdvanceTime(t *testing.T) {
251
255
defer env .ctx .Lock .Unlock ()
252
256
253
257
// Create a valid transaction
254
- builder , signer := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
258
+ builder , signer , feeCalc , err := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
259
+ require .NoError (err )
255
260
utx , err := builder .NewCreateChainTx (
256
261
testSubnet1 .ID (),
257
262
nil ,
258
263
constants .AVMID ,
259
264
nil ,
260
265
"chain name" ,
266
+ feeCalc ,
261
267
)
262
268
require .NoError (err )
263
269
tx , err := walletsigner .SignUnsigned (context .Background (), signer , utx )
@@ -320,7 +326,8 @@ func TestBuildBlockInvalidStakingDurations(t *testing.T) {
320
326
sk , err := bls .NewSecretKey ()
321
327
require .NoError (err )
322
328
323
- builder1 , signer1 := env .factory .NewWallet (preFundedKeys [0 ])
329
+ builder1 , signer1 , feeCalc1 , err := env .factory .NewWallet (preFundedKeys [0 ])
330
+ require .NoError (err )
324
331
utx1 , err := builder1 .NewAddPermissionlessValidatorTx (
325
332
& txs.SubnetValidator {
326
333
Validator : txs.Validator {
@@ -342,6 +349,7 @@ func TestBuildBlockInvalidStakingDurations(t *testing.T) {
342
349
Addrs : []ids.ShortID {preFundedKeys [0 ].PublicKey ().Address ()},
343
350
},
344
351
reward .PercentDenominator ,
352
+ feeCalc1 ,
345
353
common .WithChangeOwner (& secp256k1fx.OutputOwners {
346
354
Threshold : 1 ,
347
355
Addrs : []ids.ShortID {preFundedKeys [0 ].PublicKey ().Address ()},
@@ -361,7 +369,8 @@ func TestBuildBlockInvalidStakingDurations(t *testing.T) {
361
369
sk , err = bls .NewSecretKey ()
362
370
require .NoError (err )
363
371
364
- builder2 , signer2 := env .factory .NewWallet (preFundedKeys [2 ])
372
+ builder2 , signer2 , feeCalc2 , err := env .factory .NewWallet (preFundedKeys [2 ])
373
+ require .NoError (err )
365
374
utx2 , err := builder2 .NewAddPermissionlessValidatorTx (
366
375
& txs.SubnetValidator {
367
376
Validator : txs.Validator {
@@ -383,6 +392,7 @@ func TestBuildBlockInvalidStakingDurations(t *testing.T) {
383
392
Addrs : []ids.ShortID {preFundedKeys [2 ].PublicKey ().Address ()},
384
393
},
385
394
reward .PercentDenominator ,
395
+ feeCalc2 ,
386
396
common .WithChangeOwner (& secp256k1fx.OutputOwners {
387
397
Threshold : 1 ,
388
398
Addrs : []ids.ShortID {preFundedKeys [2 ].PublicKey ().Address ()},
@@ -426,13 +436,15 @@ func TestPreviouslyDroppedTxsCannotBeReAddedToMempool(t *testing.T) {
426
436
defer env .ctx .Lock .Unlock ()
427
437
428
438
// Create a valid transaction
429
- builder , signer := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
439
+ builder , signer , feeCalc , err := env .factory .NewWallet (testSubnet1ControlKeys [0 ], testSubnet1ControlKeys [1 ])
440
+ require .NoError (err )
430
441
utx , err := builder .NewCreateChainTx (
431
442
testSubnet1 .ID (),
432
443
nil ,
433
444
constants .AVMID ,
434
445
nil ,
435
446
"chain name" ,
447
+ feeCalc ,
436
448
)
437
449
require .NoError (err )
438
450
tx , err := walletsigner .SignUnsigned (context .Background (), signer , utx )
0 commit comments