File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed
mithril-aggregator/src/runtime
mithril-common/src/signable_builder
mithril-signer/src/runtime Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,8 @@ impl AggregatorRunnerTrait for AggregatorRunner {
363
363
. dependencies
364
364
. signable_builder_service
365
365
. compute_protocol_message ( signed_entity_type. to_owned ( ) )
366
- . await ?;
366
+ . await
367
+ . with_context ( || format ! ( "Runner can not compute protocol message for signed entity type: '{signed_entity_type}'" ) ) ?;
367
368
368
369
let multi_signer = self . dependencies . multi_signer . write ( ) . await ;
369
370
protocol_message. set_message_part (
Original file line number Diff line number Diff line change
1
+ use anyhow:: Context ;
1
2
use async_trait:: async_trait;
2
3
use std:: sync:: Arc ;
3
4
@@ -47,16 +48,20 @@ impl SignableBuilderService for MithrilSignableBuilderService {
47
48
signed_entity_type : SignedEntityType ,
48
49
) -> StdResult < ProtocolMessage > {
49
50
let protocol_message = match signed_entity_type {
50
- SignedEntityType :: MithrilStakeDistribution ( e) => {
51
- self . mithril_stake_distribution_builder
52
- . compute_protocol_message ( e)
53
- . await ?
54
- }
55
- SignedEntityType :: CardanoImmutableFilesFull ( beacon) => {
56
- self . immutable_signable_builder
57
- . compute_protocol_message ( beacon)
58
- . await ?
59
- }
51
+ SignedEntityType :: MithrilStakeDistribution ( e) => self
52
+ . mithril_stake_distribution_builder
53
+ . compute_protocol_message ( e)
54
+ . await
55
+ . with_context ( || format ! (
56
+ "Signable builder service can not compute protocol message with epoch: '{e}'"
57
+ ) ) ?,
58
+ SignedEntityType :: CardanoImmutableFilesFull ( beacon) => self
59
+ . immutable_signable_builder
60
+ . compute_protocol_message ( beacon. clone ( ) )
61
+ . await
62
+ . with_context ( || format ! (
63
+ "Signable builder service can not compute protocol message with beacon: '{beacon}'"
64
+ ) ) ?,
60
65
SignedEntityType :: CardanoStakeDistribution ( _) => todo ! ( ) ,
61
66
} ;
62
67
Original file line number Diff line number Diff line change @@ -332,7 +332,8 @@ impl Runner for SignerRunner {
332
332
. services
333
333
. signable_builder_service
334
334
. compute_protocol_message ( signed_entity_type. to_owned ( ) )
335
- . await ?;
335
+ . await
336
+ . with_context ( || format ! ( "Runner can not compute protocol message for signed entity type: '{signed_entity_type}'" ) ) ?;
336
337
337
338
// 2 set the next signers keys and stakes in the message
338
339
let epoch = signed_entity_type. get_epoch ( ) ;
You can’t perform that action at this time.
0 commit comments