Trait tidefi_primitives::pallet::SecurityExt
source · pub trait SecurityExt<AccountId, BlockNumber> {
fn is_chain_running() -> bool;
fn get_current_block_count() -> BlockNumber;
fn get_unique_id(account_id: AccountId) -> Hash;
}
Required Methods§
sourcefn is_chain_running() -> bool
fn is_chain_running() -> bool
Make sure the chain is running.
sourcefn get_current_block_count() -> BlockNumber
fn get_current_block_count() -> BlockNumber
Get the real block count processed when the chain was running. (Maintenance mode blocks are not calculated)
sourcefn get_unique_id(account_id: AccountId) -> Hash
fn get_unique_id(account_id: AccountId) -> Hash
Generates a 256-bit unique hash from an AccountId
and the
internal (auto-incrementing) Nonce
to prevent replay attacks