mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 06:15:41 +00:00
Minor documentation update for AuxStore and BlockImportParams.auxiliary (#10428)
This commit is contained in:
@@ -259,6 +259,10 @@ pub trait Finalizer<Block: BlockT, B: Backend<Block>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Provides access to an auxiliary database.
|
/// Provides access to an auxiliary database.
|
||||||
|
///
|
||||||
|
/// This is a simple global database not aware of forks. Can be used for storing auxiliary
|
||||||
|
/// information like total block weight/difficulty for fork resolution purposes as a common use
|
||||||
|
/// case.
|
||||||
pub trait AuxStore {
|
pub trait AuxStore {
|
||||||
/// Insert auxiliary data into key-value store.
|
/// Insert auxiliary data into key-value store.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -190,8 +190,9 @@ pub struct BlockImportParams<Block: BlockT, Transaction> {
|
|||||||
/// rejects block import if there are still intermediate values that remain unhandled.
|
/// rejects block import if there are still intermediate values that remain unhandled.
|
||||||
pub intermediates: HashMap<Cow<'static, [u8]>, Box<dyn Any + Send>>,
|
pub intermediates: HashMap<Cow<'static, [u8]>, Box<dyn Any + Send>>,
|
||||||
/// Auxiliary consensus data produced by the block.
|
/// Auxiliary consensus data produced by the block.
|
||||||
/// Contains a list of key-value pairs. If values are `None`, the keys
|
/// Contains a list of key-value pairs. If values are `None`, the keys will be deleted. These
|
||||||
/// will be deleted.
|
/// changes will be applied to `AuxStore` database all as one batch, which is more efficient
|
||||||
|
/// than updating `AuxStore` directly.
|
||||||
pub auxiliary: Vec<(Vec<u8>, Option<Vec<u8>>)>,
|
pub auxiliary: Vec<(Vec<u8>, Option<Vec<u8>>)>,
|
||||||
/// Fork choice strategy of this import. This should only be set by a
|
/// Fork choice strategy of this import. This should only be set by a
|
||||||
/// synchronous import, otherwise it may race against other imports.
|
/// synchronous import, otherwise it may race against other imports.
|
||||||
|
|||||||
Reference in New Issue
Block a user