Skip to content

Commit efb28cc

Browse files
timorltimorl
andauthored
Add logging about ABFT version (#823)
* Add logging about ABFT version * Legacy-only log Co-authored-by: timorl <[email protected]>
1 parent ef9752b commit efb28cc

File tree

1 file changed

+13
-4
lines changed
  • finality-aleph/src/party/manager

1 file changed

+13
-4
lines changed

finality-aleph/src/party/manager/mod.rs

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{collections::HashSet, marker::PhantomData, sync::Arc};
33
use aleph_primitives::{AlephSessionApi, KEY_TYPE};
44
use async_trait::async_trait;
55
use futures::channel::oneshot;
6-
use log::{debug, trace, warn};
6+
use log::{debug, info, trace, warn};
77
use sc_client_api::Backend;
88
use sp_consensus::SelectChain;
99
use sp_keystore::CryptoStore;
@@ -344,9 +344,18 @@ where
344344
.next_session_finality_version(&BlockId::Number(last_block_of_previous_session))
345345
{
346346
#[cfg(feature = "only_legacy")]
347-
_ if self.only_legacy() => self.legacy_subtasks(params),
348-
Ok(version) if version == CURRENT_VERSION => self.current_subtasks(params),
349-
Ok(version) if version == LEGACY_VERSION => self.legacy_subtasks(params),
347+
_ if self.only_legacy() => {
348+
info!(target: "aleph-party", "Running session with legacy-only AlephBFT version.");
349+
self.legacy_subtasks(params)
350+
}
351+
Ok(version) if version == CURRENT_VERSION => {
352+
info!(target: "aleph-party", "Running session with AlephBFT version {}, which is current.", version);
353+
self.current_subtasks(params)
354+
}
355+
Ok(version) if version == LEGACY_VERSION => {
356+
info!(target: "aleph-party", "Running session with AlephBFT version {}, which is legacy.", version);
357+
self.legacy_subtasks(params)
358+
}
350359
Ok(version) => {
351360
panic!("Unsupported version {}. Supported versions: {} or {}. Potentially outdated node.", version, LEGACY_VERSION, CURRENT_VERSION)
352361
}

0 commit comments

Comments
 (0)