mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
node: fix hardcoded block time in integration tests (#3120)
This commit is contained in:
committed by
Arkadiy Paronyan
parent
19ac4c0af3
commit
ee0f3966ba
@@ -216,7 +216,7 @@ mod tests {
|
||||
use aura::CompatibleDigestItem;
|
||||
use consensus_common::{Environment, Proposer, ImportBlock, BlockOrigin, ForkChoiceStrategy};
|
||||
use node_primitives::DigestItem;
|
||||
use node_runtime::{BalancesCall, Call, CENTS, UncheckedExtrinsic};
|
||||
use node_runtime::{BalancesCall, Call, CENTS, SECS_PER_BLOCK, UncheckedExtrinsic};
|
||||
use parity_codec::{Compact, Encode, Decode};
|
||||
use primitives::{
|
||||
crypto::Pair as CryptoPair, ed25519::Pair, blake2_256,
|
||||
@@ -302,7 +302,7 @@ mod tests {
|
||||
.create_inherent_data()
|
||||
.expect("Creates inherent data.");
|
||||
inherent_data.replace_data(finality_tracker::INHERENT_IDENTIFIER, &1u64);
|
||||
inherent_data.replace_data(timestamp::INHERENT_IDENTIFIER, &(slot_num * 10));
|
||||
inherent_data.replace_data(timestamp::INHERENT_IDENTIFIER, &(slot_num * SECS_PER_BLOCK));
|
||||
|
||||
let parent_id = BlockId::number(service.client().info().chain.best_number);
|
||||
let parent_header = service.client().header(&parent_id).unwrap().unwrap();
|
||||
@@ -312,7 +312,7 @@ mod tests {
|
||||
});
|
||||
|
||||
let mut digest = Digest::<H256>::default();
|
||||
digest.push(<DigestItem as CompatibleDigestItem<Pair>>::aura_pre_digest(slot_num * 10 / 2));
|
||||
digest.push(<DigestItem as CompatibleDigestItem<Pair>>::aura_pre_digest(slot_num));
|
||||
let proposer = proposer_factory.init(&parent_header).unwrap();
|
||||
let new_block = proposer.propose(
|
||||
inherent_data,
|
||||
|
||||
Reference in New Issue
Block a user