@@ -33,7 +33,7 @@ describe("Timelock", function() {
3333
3434 beforeEach ( async function ( ) {
3535 node = new CodeChain ( {
36- argv : [ "--force-sealing" ] ,
36+ argv : [ "--force-sealing" , "--no-reseal-timer" ] ,
3737 base : BASE
3838 } ) ;
3939 await node . start ( ) ;
@@ -157,9 +157,10 @@ describe("Timelock", function() {
157157 value : 3
158158 } ) ;
159159
160- expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 2 ) ;
160+ expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 1 ) ;
161161 await checkTx ( txhash , false ) ;
162162
163+ await node . sdk . rpc . devel . startSealing ( ) ;
163164 await node . sdk . rpc . devel . startSealing ( ) ;
164165
165166 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 3 ) ;
@@ -173,7 +174,7 @@ describe("Timelock", function() {
173174 value : 3
174175 } ) ;
175176
176- for ( let i = 2 ; i <= 3 ; i ++ ) {
177+ for ( let i = 1 ; i <= 3 ; i ++ ) {
177178 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( i ) ;
178179 await checkTx ( txhash , false ) ;
179180
@@ -278,9 +279,10 @@ describe("Timelock", function() {
278279 await node . signTransactionInput ( tx , 1 ) ;
279280 await node . sendTransaction ( tx , { awaitInvoice : false } ) ;
280281
281- expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 3 ) ;
282+ expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 2 ) ;
282283 await checkTx ( tx . hash ( ) , false ) ;
283284
285+ await node . sdk . rpc . devel . startSealing ( ) ;
284286 await node . sdk . rpc . devel . startSealing ( ) ;
285287 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 4 ) ;
286288 await checkTx ( tx . hash ( ) , false ) ;
@@ -314,9 +316,10 @@ describe("Timelock", function() {
314316 await node . signTransactionInput ( tx , 1 ) ;
315317 await node . sendTransaction ( tx , { awaitInvoice : false } ) ;
316318
317- expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 3 ) ;
319+ expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 2 ) ;
318320 await checkTx ( tx . hash ( ) , false ) ;
319321
322+ await node . sdk . rpc . devel . startSealing ( ) ;
320323 await node . sdk . rpc . devel . startSealing ( ) ;
321324 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 4 ) ;
322325 await checkTx ( tx . hash ( ) , false ) ;
@@ -350,9 +353,10 @@ describe("Timelock", function() {
350353 await node . signTransactionInput ( tx , 1 ) ;
351354 await node . sendTransaction ( tx , { awaitInvoice : false } ) ;
352355
353- expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 3 ) ;
356+ expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 2 ) ;
354357 await checkTx ( tx . hash ( ) , false ) ;
355358
359+ await node . sdk . rpc . devel . startSealing ( ) ;
356360 await node . sdk . rpc . devel . startSealing ( ) ;
357361 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 4 ) ;
358362 await checkTx ( tx . hash ( ) , true ) ;
@@ -381,14 +385,15 @@ describe("Timelock", function() {
381385 await node . signTransactionInput ( tx , 1 ) ;
382386 await node . sendTransaction ( tx , { awaitInvoice : false } ) ;
383387
384- expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 3 ) ;
388+ expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 2 ) ;
385389 await checkTx ( tx . hash ( ) , false ) ;
386390
391+ await node . sdk . rpc . devel . startSealing ( ) ;
387392 await node . sdk . rpc . devel . startSealing ( ) ;
388393 expect ( await node . getBestBlockNumber ( ) ) . to . equal ( 4 ) ;
389394 await checkTx ( tx . hash ( ) , false ) ;
390395
391- await wait ( 3000 ) ;
396+ await wait ( 3_000 ) ;
392397
393398 await node . sdk . rpc . devel . startSealing ( ) ;
394399 await node . sdk . rpc . devel . startSealing ( ) ;
0 commit comments