@@ -184,6 +184,9 @@ contract UScribeTest is Test {
184184 // No validators lifted for Schnorr or ECDSA.
185185 assertEq (uscribe.validatorsSchnorr ().length , 0 );
186186 assertEq (uscribe.validatorsECDSA ().length , 0 );
187+
188+ // Latest poke timestamp is zero.
189+ assertEq (uscribe.latestPoke (), 0 );
187190 }
188191
189192 function test_Deployment_FailsIf_NameIsEmpty () public {
@@ -231,6 +234,9 @@ contract UScribeTest is Test {
231234
232235 // Poke uPokeData with Schnorr musig.
233236 uscribe.poke (uPokeData, schnorr);
237+
238+ // Expect latestPoke timestamp to be updated.
239+ assertEq (uscribe.latestPoke (), vm.getBlockTimestamp ());
234240 }
235241
236242 function testFuzz_pokeSchnorr_FailsIf_VerificationFailed_DueTo_BarNotReached (
@@ -271,6 +277,9 @@ contract UScribeTest is Test {
271277 )
272278 );
273279 uscribe.poke (uPokeData, schnorr);
280+
281+ // Expect latestPoke timestamp to not be updated.
282+ assertEq (uscribe.latestPoke (), 0 );
274283 }
275284
276285 function testFuzz_pokeSchnorr_FailsIf_VerificationFailed_DueTo_SignatureInvalid (
@@ -314,6 +323,9 @@ contract UScribeTest is Test {
314323 )
315324 );
316325 uscribe.poke (uPokeData, schnorr);
326+
327+ // Expect latestPoke timestamp to not be updated.
328+ assertEq (uscribe.latestPoke (), 0 );
317329 }
318330
319331 function testFuzz_pokeSchnorr_FailsIf_VerificationFailed_DueTo_ValidatorInvalid (
@@ -364,6 +376,9 @@ contract UScribeTest is Test {
364376 )
365377 );
366378 uscribe.poke (uPokeData, schnorr);
379+
380+ // Expect latestPoke timestamp to not be updated.
381+ assertEq (uscribe.latestPoke (), 0 );
367382 }
368383
369384 function testFuzz_pokeSchnorr_FailsIf_VerificationFailed_DueTo_DoubleSigningAttempted (
@@ -407,6 +422,9 @@ contract UScribeTest is Test {
407422 )
408423 );
409424 uscribe.poke (uPokeData, schnorr);
425+
426+ // Expect latestPoke timestamp to not be updated.
427+ assertEq (uscribe.latestPoke (), 0 );
410428 }
411429
412430 function testFuzz_pokeSchnorr_FailsIf_ConsumerRejectedPayload (
@@ -444,6 +462,9 @@ contract UScribeTest is Test {
444462 )
445463 );
446464 uscribe.poke (uPokeData, schnorr);
465+
466+ // Expect latestPoke timestamp to not be updated.
467+ assertEq (uscribe.latestPoke (), 0 );
447468 }
448469
449470 //----------------------------------
@@ -505,6 +526,9 @@ contract UScribeTest is Test {
505526 // Poke uPokeData with Schnorr FROST.
506527 uscribe.poke (uPokeData, schnorrData);
507528
529+ // Expect latestPoke timestamp to be updated.
530+ assertEq (uscribe.latestPoke (), vm.getBlockTimestamp ());
531+
508532 // Expect poke of mutated uPokeData with Schnorr FROST to fail.
509533 vm.expectRevert (
510534 abi.encodeWithSelector (
@@ -549,6 +573,9 @@ contract UScribeTest is Test {
549573
550574 // Poke uPokeData with list of ECDSA signatures.
551575 uscribe.poke (uPokeData, ecdsas);
576+
577+ // Expect latestPoke timestamp to be updated.
578+ assertEq (uscribe.latestPoke (), vm.getBlockTimestamp ());
552579 }
553580
554581 function testFuzz_pokeECDSA_FailsIf_VerificationFailed_DueTo_BarNotReached (
@@ -583,6 +610,9 @@ contract UScribeTest is Test {
583610 )
584611 );
585612 uscribe.poke (uPokeData, ecdsas);
613+
614+ // Expect latestPoke timestamp to not be updated.
615+ assertEq (uscribe.latestPoke (), 0 );
586616 }
587617
588618 function testFuzz_pokeECDSA_FailsIf_VerificationFailed_DueTo_SignatureInvalid (
@@ -624,6 +654,9 @@ contract UScribeTest is Test {
624654 )
625655 );
626656 uscribe.poke (uPokeData, ecdsas);
657+
658+ // Expect latestPoke timestamp to not be updated.
659+ assertEq (uscribe.latestPoke (), 0 );
627660 }
628661
629662 function testFuzz_pokeECDSA_FailsIf_VerificationFailed_DueTo_DoubleSigningAttempted (
@@ -663,6 +696,9 @@ contract UScribeTest is Test {
663696 )
664697 );
665698 uscribe.poke (uPokeData, ecdsas);
699+
700+ // Expect latestPoke timestamp to not be updated.
701+ assertEq (uscribe.latestPoke (), 0 );
666702 }
667703
668704 function testFuzz_pokeECDSA_FailsIf_ConsumerRejectedPayload (
@@ -697,6 +733,9 @@ contract UScribeTest is Test {
697733 )
698734 );
699735 uscribe.poke (uPokeData, ecdsas);
736+
737+ // Expect latestPoke timestamp to not be updated.
738+ assertEq (uscribe.latestPoke (), 0 );
700739 }
701740
702741 //--------------------------------------------------------------------------
0 commit comments