@@ -60,12 +60,9 @@ describe('SFC', () => {
60
60
validator . address ,
61
61
1 ,
62
62
validator . publicKey ,
63
- 1 << 3 ,
64
- await this . sfc . currentEpoch ( ) ,
65
63
Date . now ( ) ,
66
- 0 ,
67
- 0 ,
68
64
) ;
65
+ await this . sfc . deactivateValidator ( 1 , 1 << 3 ) ;
69
66
await this . sfc . disableNonNodeCalls ( ) ;
70
67
} ) ;
71
68
@@ -319,18 +316,14 @@ describe('SFC', () => {
319
316
validator ,
320
317
1 ,
321
318
validator . publicKey ,
322
- 0 ,
323
- await this . sfc . currentEpoch ( ) ,
324
319
Date . now ( ) ,
325
- 0 ,
326
- 0 ,
327
320
) ,
328
321
) . to . be . revertedWithCustomError ( this . sfc , 'NotDriverAuth' ) ;
329
322
} ) ;
330
323
331
324
it ( 'Should revert when setGenesisDelegation is not called not node' , async function ( ) {
332
325
const delegator = ethers . Wallet . createRandom ( ) ;
333
- await expect ( this . sfc . setGenesisDelegation ( delegator , 1 , 100 , 0 , 0 , 0 , 0 , 0 , 1000 ) ) . to . be . revertedWithCustomError (
326
+ await expect ( this . sfc . setGenesisDelegation ( delegator , 1 , 100 ) ) . to . be . revertedWithCustomError (
334
327
this . sfc ,
335
328
'NotDriverAuth' ,
336
329
) ;
@@ -981,18 +974,14 @@ describe('SFC', () => {
981
974
this . delegator ,
982
975
1 ,
983
976
key ,
984
- 1 << 3 ,
985
- await this . sfc . currentEpoch ( ) ,
986
977
Date . now ( ) ,
987
- 0 ,
988
- 0 ,
989
978
) ,
990
979
) . to . be . revertedWithCustomError ( this . nodeDriverAuth , 'NotDriver' ) ;
991
980
} ) ;
992
981
993
982
it ( 'Should revert when calling setGenesisDelegation if not NodeDriver' , async function ( ) {
994
983
await expect (
995
- this . nodeDriverAuth . setGenesisDelegation ( this . delegator , 1 , 100 , 0 , 0 , 0 , 0 , 0 , 1000 ) ,
984
+ this . nodeDriverAuth . setGenesisDelegation ( this . delegator , 1 , 100 ) ,
996
985
) . to . be . revertedWithCustomError ( this . nodeDriverAuth , 'NotDriver' ) ;
997
986
} ) ;
998
987
@@ -1131,7 +1120,7 @@ describe('SFC', () => {
1131
1120
} ) ;
1132
1121
1133
1122
it ( 'Should succeed and setGenesisDelegation Validator' , async function ( ) {
1134
- await this . sfc . setGenesisDelegation ( this . delegator , this . validatorId , ethers . parseEther ( '1' ) , 0 , 0 , 0 , 0 , 0 , 100 ) ;
1123
+ await this . sfc . setGenesisDelegation ( this . delegator , this . validatorId , ethers . parseEther ( '1' ) ) ;
1135
1124
// delegator has already delegated 0.4 in fixture
1136
1125
expect ( await this . sfc . getStake ( this . delegator , this . validatorId ) ) . to . equal ( ethers . parseEther ( '1.4' ) ) ;
1137
1126
} ) ;
0 commit comments