Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit f24c4d9

Browse files
committed
1 parent 7a9df35 commit f24c4d9

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

nimbus-consensus/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use tracing::error;
4545
use sp_keystore::{SyncCryptoStorePtr, SyncCryptoStore};
4646
use sp_core::crypto::Public;
4747
use sp_std::convert::TryInto;
48-
use nimbus_primitives::{AuthorFilterAPI, NimbusApi, NIMBUS_KEY_ID, NimbusId};
48+
use nimbus_primitives::{AuthorFilterAPI, NimbusApi, NIMBUS_KEY_ID, NimbusId, digests::CompatibleDigestItem};
4949
mod import_queue;
5050

5151
const LOG_TARGET: &str = "filtering-consensus";
@@ -315,7 +315,7 @@ where
315315
.clone()
316316
.try_into().ok()?;
317317

318-
let sig_digest = <sp_runtime::traits::DigestItemFor<B> as nimbus_primitives::digests::CompatibleDigestItem>::nimbus_seal(signature);
318+
let sig_digest = <sp_runtime::DigestItem as CompatibleDigestItem>::nimbus_seal(signature);
319319

320320
let mut block_import_params = BlockImportParams::new(BlockOrigin::Own, header.clone());
321321
block_import_params.post_digests.push(sig_digest.clone());

nimbus-primitives/src/digests.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
2626
use crate::{NIMBUS_ENGINE_ID, NimbusSignature, NimbusId};
2727
use sp_runtime::generic::DigestItem;
28-
use parity_scale_codec::{Encode, Codec};
29-
use sp_std::fmt::Debug;
28+
use parity_scale_codec::Encode;
3029

3130
/// A digest item which is usable with aura consensus.
3231
pub trait CompatibleDigestItem: Sized {
@@ -43,9 +42,7 @@ pub trait CompatibleDigestItem: Sized {
4342
fn as_nimbus_consensus_digest(&self) -> Option<NimbusId>;
4443
}
4544

46-
impl<Hash> CompatibleDigestItem for DigestItem<Hash> where
47-
Hash: Debug + Send + Sync + Eq + Clone + Codec + 'static
48-
{
45+
impl CompatibleDigestItem for DigestItem {
4946
fn nimbus_seal(signature: NimbusSignature) -> Self {
5047
DigestItem::Seal(NIMBUS_ENGINE_ID, signature.encode())
5148
}

pallets/author-inherent/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub mod pallet {
118118
Author::<T>::put(&account);
119119

120120
// Add a consensus digest so the client-side worker can verify the block is signed by the right person.
121-
frame_system::Pallet::<T>::deposit_log(DigestItem::<T::Hash>::Consensus(
121+
frame_system::Pallet::<T>::deposit_log(DigestItem::Consensus(
122122
NIMBUS_ENGINE_ID,
123123
author.encode(),
124124
));

0 commit comments

Comments
 (0)