mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
Ignore duplicate blocks in fork choice
This commit is contained in:
@@ -130,6 +130,11 @@ impl ProtoArray {
|
||||
justified_epoch: Epoch,
|
||||
finalized_epoch: Epoch,
|
||||
) -> Result<(), Error> {
|
||||
// If the block is already known, simply ignore it.
|
||||
if self.indices.contains_key(&root) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let node_index = self.nodes.len();
|
||||
|
||||
let node = ProtoNode {
|
||||
|
||||
Reference in New Issue
Block a user