mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +00:00
Use milliseconds for timestamp resolution (#3210)
* node: tabify constants file * node: define minimum period and slot duration in milliseconds * core: srml: use milliseconds for timestamp resolution * core: update slot_duration to millis in tests * node: bump spec_version * node: fix integration test * node: fix executor test * Update node/runtime/src/lib.rs Co-Authored-By: Kian Peymani <Kianenigma@users.noreply.github.com> * node: fix docs on timestamp resolution * node: add docs on u64 for millis
This commit is contained in:
@@ -264,7 +264,7 @@ mod tests {
|
||||
use consensus_common::{Environment, Proposer, BlockImportParams, BlockOrigin, ForkChoiceStrategy};
|
||||
use node_primitives::DigestItem;
|
||||
use node_runtime::{BalancesCall, Call, UncheckedExtrinsic};
|
||||
use node_runtime::constants::{currency::CENTS, time::SECS_PER_BLOCK};
|
||||
use node_runtime::constants::{currency::CENTS, time::SLOT_DURATION};
|
||||
use parity_codec::{Encode, Decode};
|
||||
use primitives::{
|
||||
crypto::Pair as CryptoPair, blake2_256,
|
||||
@@ -365,7 +365,7 @@ mod tests {
|
||||
// even though there's only one authority some slots might be empty,
|
||||
// so we must keep trying the next slots until we can claim one.
|
||||
let babe_pre_digest = loop {
|
||||
inherent_data.replace_data(timestamp::INHERENT_IDENTIFIER, &(slot_num * SECS_PER_BLOCK));
|
||||
inherent_data.replace_data(timestamp::INHERENT_IDENTIFIER, &(slot_num * SLOT_DURATION));
|
||||
if let Some(babe_pre_digest) = babe::test_helpers::claim_slot(
|
||||
&*service.client(),
|
||||
&parent_id,
|
||||
|
||||
Reference in New Issue
Block a user