mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Run offchain workers at hash, not number. (#4878)
* Run offchain workers at particular hash, not number. * Don't run if not new best. * Don't run if not new best. * Update client/service/src/builder.rs Co-Authored-By: Nikolay Volf <nikvolf@gmail.com> * Update client/service/src/builder.rs Co-Authored-By: Nikolay Volf <nikvolf@gmail.com> * Update client/service/src/builder.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -320,7 +320,9 @@ pub fn require_header<Block: BlockT>(
|
||||
id: BlockId<Block>,
|
||||
) -> sp_blockchain::Result<Block::Header> {
|
||||
read_header(db, col_index, col, id)
|
||||
.and_then(|header| header.ok_or_else(|| sp_blockchain::Error::UnknownBlock(format!("{}", id))))
|
||||
.and_then(|header| header.ok_or_else(||
|
||||
sp_blockchain::Error::UnknownBlock(format!("Require header: {}", id))
|
||||
))
|
||||
}
|
||||
|
||||
/// Read meta from the database.
|
||||
|
||||
Reference in New Issue
Block a user