mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +00:00
Ignore duplicate blocks in fork choice
This commit is contained in:
@@ -130,6 +130,11 @@ impl ProtoArray {
|
|||||||
justified_epoch: Epoch,
|
justified_epoch: Epoch,
|
||||||
finalized_epoch: Epoch,
|
finalized_epoch: Epoch,
|
||||||
) -> Result<(), Error> {
|
) -> 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_index = self.nodes.len();
|
||||||
|
|
||||||
let node = ProtoNode {
|
let node = ProtoNode {
|
||||||
|
|||||||
Reference in New Issue
Block a user