fix race in light_peer_imports_header_from_announce (#4579)

This commit is contained in:
Svyatoslav Nikolsky authored and Gavin Wood committed 2020-01-09 23:28:04 +01:00
1 parent bc3d283e78
commit f372fa4d72
6 files changed
+76 -29

No files matched your search

+4 -4
View File
@@ -259,19 +259,19 @@ pub trait Storage<Block: BlockT>: AuxStore + HeaderBackend<Block> + HeaderMetada
/// Get last finalized header.
fn last_finalized(&self) -> ClientResult<Block::Hash>;
/// Get headers CHT root for given block. Fails if the block is not pruned (not a part of any CHT).
/// Get headers CHT root for given block. Returns None if the block is not pruned (not a part of any CHT).
fn header_cht_root(
&self,
cht_size: NumberFor<Block>,
block: NumberFor<Block>,
) -> ClientResult<Block::Hash>;
) -> ClientResult<Option<Block::Hash>>;
/// Get changes trie CHT root for given block. Fails if the block is not pruned (not a part of any CHT).
/// Get changes trie CHT root for given block. Returns None if the block is not pruned (not a part of any CHT).
fn changes_trie_cht_root(
&self,
cht_size: NumberFor<Block>,
block: NumberFor<Block>,
) -> ClientResult<Block::Hash>;
) -> ClientResult<Option<Block::Hash>>;
/// Get storage cache.
fn cache(&self) -> Option<Arc<dyn BlockchainCache<Block>>>;