diff --git a/substrate/runtime/src/lib.rs b/substrate/runtime/src/lib.rs index 3e39aba6..2f792076 100644 --- a/substrate/runtime/src/lib.rs +++ b/substrate/runtime/src/lib.rs @@ -184,6 +184,7 @@ impl pallet_assets::Config for Runtime { type ApprovalDeposit = ConstU64<0>; // Unused hooks + type CallbackHandle = (); type Freezer = (); type Extra = (); diff --git a/substrate/tendermint/client/src/authority/mod.rs b/substrate/tendermint/client/src/authority/mod.rs index 09242fce..519dbd72 100644 --- a/substrate/tendermint/client/src/authority/mod.rs +++ b/substrate/tendermint/client/src/authority/mod.rs @@ -21,7 +21,6 @@ use sp_runtime::{ Digest, }; use sp_blockchain::HeaderBackend; -use sp_api::BlockId; use sp_consensus::{Error, BlockOrigin, Proposer, Environment}; use sc_consensus::import_queue::IncomingBlock; @@ -200,9 +199,7 @@ impl TendermintAuthority { }; // Get our first proposal - let proposal = authority - .get_proposal(&import.client.header(BlockId::Hash(last_hash)).unwrap().unwrap()) - .await; + let proposal = authority.get_proposal(&import.client.header(last_hash).unwrap().unwrap()).await; // Create the gossip network // This has to be spawning the machine, else gossip fails for some reason diff --git a/substrate/tendermint/client/src/block_import.rs b/substrate/tendermint/client/src/block_import.rs index 681fbd8c..84fc8dab 100644 --- a/substrate/tendermint/client/src/block_import.rs +++ b/substrate/tendermint/client/src/block_import.rs @@ -2,7 +2,6 @@ use std::{marker::PhantomData, sync::Arc, collections::HashMap}; use async_trait::async_trait; -use sp_api::BlockId; use sp_runtime::traits::{Header, Block}; use sp_blockchain::{BlockStatus, HeaderBackend, Backend as BlockchainBackend}; use sp_consensus::{Error, CacheKeyId, BlockOrigin, SelectChain}; @@ -15,13 +14,12 @@ use crate::{TendermintValidator, tendermint::TendermintImport}; impl TendermintImport { fn check_already_in_chain(&self, hash: ::Hash) -> bool { - let id = BlockId::Hash(hash); // If it's in chain, with justifications, return it's already on chain // If it's in chain, without justifications, continue the block import process to import its // justifications // This can be triggered if the validators add a block, without justifications, yet the p2p // process then broadcasts it with its justifications - (self.client.status(id).unwrap() == BlockStatus::InChain) && + (self.client.status(hash).unwrap() == BlockStatus::InChain) && self.client.justifications(hash).unwrap().is_some() } } @@ -173,7 +171,7 @@ impl> SelectChain for TendermintSelectChain { .0 .blockchain() // There should always be a finalized block - .header(BlockId::Hash(self.0.blockchain().last_finalized().unwrap())) + .header(self.0.blockchain().last_finalized().unwrap()) // There should not be an error in retrieving it and since it's finalized, it should exist .unwrap() .unwrap(),