verification: fix race same block + misc (#11400)

* ethcore: fix race in verification

* verification: fix some nits

* verification: refactor err type `Kind::create`

* fix: tests

* address grumbles

* address grumbles: don't panic
This commit is contained in:
Niklas Adolfsson
2020-01-24 16:51:11 +01:00
committed by Andronik Ordian
parent 108daf1861
commit a47a5b1992
5 changed files with 120 additions and 98 deletions

View File

@@ -220,7 +220,7 @@ impl<T: ChainDataFetcher> Client<T> {
/// Import a header to the queue for additional verification.
pub fn import_header(&self, header: Header) -> EthcoreResult<H256> {
self.queue.import(header).map_err(|(_, e)| e)
self.queue.import(header).map_err(|(e, _)| e)
}
/// Inquire about the status of a given header.