Skip to content

Commit

Permalink
Adjust tests for new timestamp handling
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Nov 28, 2023
1 parent 8f31705 commit 8681895
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions tests/difference/core/quint_model/ccv_model.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,17 @@ module ccv_model {
assert(currentState.consumerStates.get("consumer1").maturationTimes.length() == 1),
// the validator set was put as the current validator set
assert(currentState.consumerStates.get("consumer1").chainState.currentValidatorSet == InitialValidatorSet.put("node1", 200)),
// advance time on provider until the unbonding period is over
EndAndBeginBlockForProvider(UnbondingPeriodPerChain.get("consumer1"), Set(), Set()),
// advance time on provider and consumer until unbonding period is over - ensure that the consumer and provider
// stay in sync relative to each other
4.reps(
i =>
EndAndBeginBlockForProvider(UnbondingPeriodPerChain.get("consumer1")/4, Set(), Set()).then(
EndAndBeginBlockForConsumer("consumer1", UnbondingPeriodPerChain.get("consumer1")/4)
)

)
}
)
.then(
// advance time on consumer until the unbonding period is over
EndAndBeginBlockForConsumer("consumer1", UnbondingPeriodPerChain.get("consumer1"))
)
.then(
all {
// the packet has not matured yet - the timestamp for the current block is after the naturation time,
Expand Down
4 changes: 2 additions & 2 deletions tests/difference/core/quint_model/ccv_test.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module ccv_test {
pure val ccvTimeouts = chains.mapBy(chain => 3 * Week)
pure val trustingPeriods = chains.mapBy(chain => 2 * Week - 1 * Hour)

import ccv(VscTimeout = 5 * Week, CcvTimeout = ccvTimeouts, UnbondingPeriodPerChain = unbondingPeriods, ConsumerChains = consumerChains).* from "./ccv"
import ccv(VscTimeout = 5 * Week, CcvTimeout = ccvTimeouts, UnbondingPeriodPerChain = unbondingPeriods, ConsumerChains = consumerChains, TrustingPeriodPerChain=trustingPeriods).* from "./ccv"

// changing voting power by zero gives an error
run VotingPowerZeroChangeTest =
Expand Down Expand Up @@ -158,7 +158,7 @@ module ccv_test {
"providerState", DeliverPacketToProviderHappyPathTest_testState.providerState.with(
"chainState", DeliverPacketToProviderHappyPathTest_testState.providerState.chainState.with(
// set the timestamp to be after the timeout
"lastTimestamp", CcvTimeout.get("sender") + 1
"runningTimestamp", CcvTimeout.get("sender") + 1
)
)
)
Expand Down

0 comments on commit 8681895

Please sign in to comment.