From 9376e2b0d230519a5c628e37d6a8ee659879d7e1 Mon Sep 17 00:00:00 2001
From: Philip Offtermatt
Date: Fri, 26 Jan 2024 15:59:50 +0100
Subject: [PATCH] Start refactoring keys of sentVscPackets map
---
tests/mbt/model/ccv_model.qnt | 2 +-
tests/mbt/model/ccv_utils.qnt | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/mbt/model/ccv_model.qnt b/tests/mbt/model/ccv_model.qnt
index 105918d844..476b6365eb 100644
--- a/tests/mbt/model/ccv_model.qnt
+++ b/tests/mbt/model/ccv_model.qnt
@@ -443,7 +443,7 @@ module ccv_model {
val CanSendVscPackets =
not(ConsumerChains.exists(
consumer =>
- currentState.providerState.outstandingPacketsToConsumer.get(consumer).length() > 0
+ currentState.providerState.outstandingPacketsToConsumer.getOrElse(consumer, List()).length() > 0
))
val CanReceiveVscPackets =
diff --git a/tests/mbt/model/ccv_utils.qnt b/tests/mbt/model/ccv_utils.qnt
index c1c67460d1..88ada4fdde 100644
--- a/tests/mbt/model/ccv_utils.qnt
+++ b/tests/mbt/model/ccv_utils.qnt
@@ -409,6 +409,9 @@ module ccv_utils {
status == RUNNING
}
+ // Returns the set of all consumer chains.
+ pure def GetConsumers(providerState: ProviderState): Set[Chain] = providerState.consumerStatus.keys()
+
// Returns the set of all consumer chains that currently have the status RUNNING.
pure def getRunningConsumers(providerState: ProviderState): Set[Chain] = {
providerState.consumerStatus.keys().filter(