Swap ImportQueue from a Map to a Vec

There's an edge case where different blocks can have the same block
body.
This commit is contained in:
Paul Hauner
2019-03-24 14:22:12 +11:00
parent 15f853416b
commit 5f4f67f46f
3 changed files with 45 additions and 21 deletions

View File

@@ -64,6 +64,15 @@ impl BlockProcessingOutcome {
},
}
}
/// Returns `true` if the block was successfully processed and can be removed from any import
/// queues or temporary storage.
pub fn sucessfully_processed(&self) -> bool {
match self {
BlockProcessingOutcome::ValidBlock(_) => true,
_ => false,
}
}
}
pub struct BeaconChain<T: ClientDB + Sized, U: SlotClock, F: ForkChoice> {