remover ancient code
@@ -432,83 +432,6 @@ mod tests {
type AccountPublic = <Signature as Verify>::Signer;
- #[cfg(feature = "rhd")]
- fn test_sync() {
- use sp_core::ed25519::Pair;
-
- use {service_test, Factory};
- use sp_consensus::{BlockImportParams, BlockOrigin};
-
- let alice: Arc<ed25519::Pair> = Arc::new(Keyring::Alice.into());
- let bob: Arc<ed25519::Pair> = Arc::new(Keyring::Bob.into());
- let validators = vec![alice.public().0.into(), bob.public().0.into()];
- let keys: Vec<&ed25519::Pair> = vec![&*alice, &*bob];
- let dummy_runtime = ::tokio::runtime::Runtime::new().unwrap();
- let block_factory = |service: &<Factory as service::ServiceFactory>::FullService| {
- let block_id = BlockId::number(service.client().chain_info().best_number);
- let parent_header = service.client().best_header(&block_id)
- .expect("db error")
- .expect("best block should exist");
-
- futures::executor::block_on(
- service.transaction_pool().maintain(
- ChainEvent::NewBlock {
- is_new_best: true,
- id: block_id.clone(),
- retracted: vec![],
- header: parent_header,
- },
- )
- );
-
- let consensus_net = ConsensusNetwork::new(service.network(), service.client().clone());
- let proposer_factory = consensus::ProposerFactory {
- client: service.client().clone(),
- transaction_pool: service.transaction_pool().clone(),
- network: consensus_net,
- force_delay: 0,
- handle: dummy_runtime.executor(),
- };
- let (proposer, _, _) = proposer_factory.init(&parent_header, &validators, alice.clone()).unwrap();
- let block = proposer.propose().expect("Error making test block");
- BlockImportParams {
- origin: BlockOrigin::File,
- justification: Vec::new(),
- internal_justification: Vec::new(),
- finalized: false,
- body: Some(block.extrinsics),
- storage_changes: None,
- header: block.header,
- auxiliary: Vec::new(),
- }
- };
- let extrinsic_factory =
- |service: &SyncService<<Factory as service::ServiceFactory>::FullService>|
- {
- let payload = (
- 0,
- Call::Balances(BalancesCall::transfer(RawAddress::Id(bob.public().0.into()), 69.into())),
- Era::immortal(),
- service.client().genesis_hash()
- );
- let signature = alice.sign(&payload.encode()).into();
- let id = alice.public().0.into();
- let xt = UncheckedExtrinsic {
- signature: Some((RawAddress::Id(id), signature, payload.0, Era::immortal())),
- function: payload.1,
- }.encode();
- let v: Vec<u8> = Decode::decode(&mut xt.as_slice()).unwrap();
- OpaqueExtrinsic(v)
- };
- sc_service_test::sync(
- sc_chain_spec::integration_test_config(),
- |config| new_full(config),
- |mut config| new_light(config),
- block_factory,
- extrinsic_factory,
- );
- }
-
#[test]
// It is "ignored", but the node-cli ignored tests are running on the CI.
// This can be run locally with `cargo test --release -p node-cli test_sync -- --ignored`.
