Skip to content

Commit 842e51d

Browse files
committed
Fix end to end test
1 parent 77c5285 commit 842e51d

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

mithril-aggregator/src/multi_signer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,11 @@ impl MultiSigner for MultiSignerImpl {
185185

186186
/// Update current message
187187
fn update_current_message(&mut self, message: Bytes) -> Result<(), ProtocolError> {
188+
if self.current_message.clone() != Some(message.clone()) {
189+
self.multi_signature = None;
190+
self.single_signatures.drain();
191+
}
188192
self.current_message = Some(message);
189-
self.multi_signature = None;
190-
self.single_signatures.drain();
191193
Ok(())
192194
}
193195

mithril-test-lab/mithril-end-to-end/src/Mithril/Aggregator.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ data Certificate = Certificate
3838
digest :: Text,
3939
started_at :: UTCTime,
4040
completed_at :: UTCTime,
41-
participants :: [SignerWithStake],
41+
signers :: [SignerWithStake],
42+
aggregate_verification_key :: Text,
4243
multisignature :: Text
4344
}
4445
deriving (Eq, Show, Generic, ToJSON, FromJSON)

mithril-test-lab/mithril-end-to-end/test/Test/EndToEndSpec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Hydra.Prelude
2020
import Logging (ClusterLog (..))
2121
import Mithril.Aggregator
2222
( Aggregator (..),
23-
Certificate (Certificate, participants),
23+
Certificate (Certificate, signers),
2424
CertificatePending (CertificatePending, beacon),
2525
digestOf,
2626
withAggregator,
@@ -76,8 +76,8 @@ assertSignerIsSigningSnapshot _signer aggregatorPort digest = go 10
7676
200 -> do
7777
let body = getResponseBody response
7878
case eitherDecode body of
79-
Right Certificate {participants} ->
80-
length participants `shouldBe` 1 -- FIXME: should be the number of registered signers but currently hardcoded
79+
Right Certificate {signers} ->
80+
length signers `shouldBe` 1 -- FIXME: should be the number of registered signers but currently hardcoded
8181
Left err -> failure $ "invalid certificate body : " <> show err <> ", raw body: '" <> show body <> "'"
8282
other -> failure $ "unexpected status code: " <> show other
8383

0 commit comments

Comments
 (0)