Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Dec 5, 2023
1 parent db9a697 commit bf2d8d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ test-mbt-cov:
go test ./tests/mbt/... -timeout 30m -coverpkg=./... -coverprofile=mbt-profile.out -covermode=atomic

# runs mbt tests, but generates more traces
test-mbt-long:
test-mbt-more-traces:
cd tests/mbt/driver;\
sh generate_traces_long.sh;\
sh generate_more_traces.sh;\
cd ../../..;\
go test ./tests/mbt/... -timeout 30m

Expand Down
14 changes: 5 additions & 9 deletions tests/mbt/driver/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (s *Driver) validator(i int64) sdk.ValAddress {
}

// consumerPower returns the power on the consumer chain chain for
// validator with id (ix) i
// the validator with index i
func (s *Driver) consumerPower(i int64, chain ChainId) (int64, error) {
v, found := s.consumerKeeper(chain).GetCCValidator(s.ctx(chain), s.validator(i))
if !found {
Expand Down Expand Up @@ -149,9 +149,7 @@ func (s *Driver) delegate(val, amt int64) {
d := s.delegator()
v := s.validator(val)
msg := stakingtypes.NewMsgDelegate(d, v, coin)
_, err := server.Delegate(sdk.WrapSDKContext(s.ctx(P)), msg)
// There may or may not be an error, depending on the trace
_ = err
server.Delegate(sdk.WrapSDKContext(s.ctx(P)), msg)
}

// undelegate undelegates amt tokens from validator val
Expand All @@ -162,13 +160,11 @@ func (s *Driver) undelegate(val, amt int64) {
d := s.delegator()
v := s.validator(val)
msg := stakingtypes.NewMsgUndelegate(d, v, coin)
_, err := server.Undelegate(sdk.WrapSDKContext(s.ctx(P)), msg)
// There may or may not be an error, depending on the trace
_ = err
server.Undelegate(sdk.WrapSDKContext(s.ctx(P)), msg)
providerStaking.GetAllDelegations(s.ctx(P))
}

// packetQueue returns the queued packet sfrom sender to receiver,
// packetQueue returns the queued packets from sender to receiver,
// where either sender or receiver must be the provider.
func (s *Driver) packetQueue(sender, receiver ChainId) []simibc.Packet {
var path *simibc.RelayedPath
Expand Down Expand Up @@ -213,7 +209,7 @@ func (s *Driver) getStateString() string {
}

func (s *Driver) isProviderChain(chain ChainId) bool {
return chain == "provider"
return chain == P
}

func (s *Driver) getChainStateString(chain ChainId) string {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/mbt/model/ccv.qnt
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ module ccv {
consumersToStop: Set[Chain]): Result = {
val currentProviderState = currentState.providerState

// check for Vsc timeouts
// check for vsc timeouts
val timedOutConsumers = getRunningConsumers(currentProviderState).filter(
consumer =>
val res = TimeoutDueToVscTimeout(currentState, consumer)
Expand Down

0 comments on commit bf2d8d5

Please sign in to comment.