Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
bkchr committed Jun 5, 2023
1 parent d12e6ba commit 65248e9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/consensus/babe/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ thiserror = "1.0"
sc-consensus-babe = { version = "0.10.0-dev", path = "../" }
sc-consensus-epochs = { version = "0.10.0-dev", path = "../../epochs" }
sc-rpc-api = { version = "0.10.0-dev", path = "../../../rpc-api" }
sc-transaction-pool-api = { version = "4.0.0-dev", path = "../../../transaction-pool/api" }
sp-api = { version = "4.0.0-dev", path = "../../../../primitives/api" }
sp-application-crypto = { version = "23.0.0", path = "../../../../primitives/application-crypto" }
sp-blockchain = { version = "4.0.0-dev", path = "../../../../primitives/blockchain" }
Expand Down
25 changes: 14 additions & 11 deletions client/consensus/babe/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ impl From<Error> for JsonRpseeError {
#[cfg(test)]
mod tests {
use super::*;
use sc_consensus_babe::ImportQueueParams;
use sc_transaction_pool_api::{OffchainTransactionPoolFactory, RejectAllTxPool};
use sp_consensus_babe::inherents::InherentDataProvider;
use sp_core::{crypto::key_types::BABE, testing::TaskExecutor};
use sp_keyring::Sr25519Keyring;
Expand Down Expand Up @@ -219,22 +221,23 @@ mod tests {
sc_consensus_babe::block_import(config.clone(), client.clone(), client.clone())
.expect("can initialize block-import");

let (_, babe_worker_handle) = sc_consensus_babe::import_queue(
link.clone(),
block_import.clone(),
None,
client.clone(),
longest_chain.clone(),
move |_, _| async move {
let (_, babe_worker_handle) = sc_consensus_babe::import_queue(ImportQueueParams {
babe_link: link.clone(),
block_import: block_import.clone(),
justification_import: None,
client: client.clone(),
select_chain: longest_chain.clone(),
create_inherent_data_providers: move |_, _| async move {
Ok((InherentDataProvider::from_timestamp_and_slot_duration(
0.into(),
slot_duration,
),))
},
&task_executor,
None,
None,
)
spawner: &task_executor,
registry: None,
telemetry: None,
offchain_tx_pool: OffchainTransactionPoolFactory::new(RejectAllTxPool::default()),
})
.unwrap();

Babe::new(client.clone(), babe_worker_handle, keystore, longest_chain, deny_unsafe)
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use sc_consensus::{BoxBlockImport, BoxJustificationImport};
use sc_consensus_epochs::{EpochIdentifier, EpochIdentifierPosition};
use sc_consensus_slots::BackoffAuthoringOnFinalizedHeadLagging;
use sc_network_test::{Block as TestBlock, *};
use sc_transaction_pool_api::{LocalTransactionPool, RejectAllTxPool};
use sc_transaction_pool_api::RejectAllTxPool;
use sp_application_crypto::key_types::BABE;
use sp_consensus::{DisableProofRecording, NoNetwork as DummyOracle, Proposal};
use sp_consensus_babe::{
Expand Down
4 changes: 2 additions & 2 deletions client/transaction-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ use std::{
use graph::{ExtrinsicHash, IsValidator};
use sc_transaction_pool_api::{
error::Error as TxPoolError, ChainEvent, ImportNotificationStream, MaintainedTransactionPool,
OffchainTransactionPoolFactory, PoolFuture, PoolStatus, ReadyTransactions, TransactionFor,
TransactionPool, TransactionSource, TransactionStatusStreamFor, TxHash,
PoolFuture, PoolStatus, ReadyTransactions, TransactionFor, TransactionPool, TransactionSource,
TransactionStatusStreamFor, TxHash,
};
use sp_core::traits::SpawnEssentialNamed;
use sp_runtime::{
Expand Down

0 comments on commit 65248e9

Please sign in to comment.