You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Taken from design doc regarding PreCommitActions (link):
PreCommitActions is a trait that allows you to perform registered actions on block import and/or updated finality. The actions are performed before committing to the underlying db.
/// Callback invoked before committing the operations created during block import./// This gives the opportunity to perform auxiliary pre-commit actions and optionally/// enqueue further storage write operations to be atomically performed on commit.pubtypeOnImportAction<Block> =
Box<dyn(Fn(&BlockImportNotification<Block>) -> AuxDataOperations) + Send>;/// Callback invoked before committing the operations created during block finalization./// This gives the opportunity to perform auxiliary pre-commit actions and optionally/// enqueue further storage write operations to be atomically performed on commit.pubtypeOnFinalityAction<Block> =
Box<dyn(Fn(&FinalityNotification<Block>) -> AuxDataOperations) + Send>;/// Interface to perform auxiliary actions before committing a block import or/// finality operation.pubtraitPreCommitActions<Block:BlockT>{/// Actions to be performed on block import.fnregister_import_action(&self,op:OnImportAction<Block>);/// Actions to be performed on block finalization.fnregister_finality_action(&self,op:OnFinalityAction<Block>);}
For OnImportAction you receive a BlockImportNotification and you're expected to return AuxDataOperations which is already introduced in PR #4405. The AuxStore interface is already introduced and implemented by db.Backend.
The PreCommitActions trait/interface is not used by any BlockState or StorageState functionality. Rather it will be used for future work regarding BEEFY and GRANDPA.
Issue Summary
Taken from design doc regarding
PreCommitActions
(link):Acceptance Criteria
PreCommitActions
interfacePreCommitActions
interface.Other Information and useful links
PreCommitActions
.The text was updated successfully, but these errors were encountered: