referrerpolicy=no-referrer-when-downgrade
polkadot_overseer

Type Alias UnpinHandle

Source
pub type UnpinHandle = UnpinHandle<Block<Header<u32, BlakeTwo256>, OpaqueExtrinsic>>;
Expand description

Keeps the state of a specific block pinned in memory while the handle is alive.

The handle is reference counted and once the last is dropped, the block is unpinned.

This is useful for runtime API calls to blocks that are racing against finality, e.g. for slashing purposes.

Aliased Type§

struct UnpinHandle(/* private fields */);

Implementations

Source§

impl<Block> UnpinHandle<Block>
where Block: Block,

Source

pub fn new( hash: <Block as Block>::Hash, unpin_worker_sender: TracingUnboundedSender<UnpinWorkerMessage<Block>>, ) -> UnpinHandle<Block>

Create a new UnpinHandle

Source

pub fn hash(&self) -> <Block as Block>::Hash

Hash of the block this handle is unpinning on drop

Trait Implementations

Source§

impl<Block> Clone for UnpinHandle<Block>
where Block: Clone + Block,

Source§

fn clone(&self) -> UnpinHandle<Block>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Block> Debug for UnpinHandle<Block>
where Block: Debug + Block,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more