mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 04:37:13 +00:00
should_extend_payload fix
This commit is contained in:
@@ -116,6 +116,10 @@ impl<T: BeaconChainTypes> GossipVerifiedInclusionList<T> {
|
|||||||
return Err(GossipInclusionListError::InvalidSignature);
|
return Err(GossipInclusionListError::InvalidSignature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO(focil): Per spec p2p-interface.md rule 5, the first OR second valid message
|
||||||
|
// should be allowed (to enable equivocation detection in the cache). Currently this
|
||||||
|
// rejects any second message, making the cache's equivocation logic dead code.
|
||||||
|
// See: https://github.com/ethereum/consensus-specs/blob/master/specs/heze/p2p-interface.md#inclusion_list
|
||||||
if chain.inclusion_list_seen(signed_il) {
|
if chain.inclusion_list_seen(signed_il) {
|
||||||
return Err(GossipInclusionListError::PriorInclusionListKnown);
|
return Err(GossipInclusionListError::PriorInclusionListKnown);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1510,9 +1510,14 @@ impl ProtoArray {
|
|||||||
proto_node: &ProtoNode,
|
proto_node: &ProtoNode,
|
||||||
proposer_boost_root: Hash256,
|
proposer_boost_root: Hash256,
|
||||||
) -> Result<bool, Error> {
|
) -> Result<bool, Error> {
|
||||||
// If the block's inclusion list satisfaction has been recorded as false,
|
// Per spec: is_payload_inclusion_list_satisfied returns false unless the
|
||||||
// do not extend the payload.
|
// root is in the map AND the value is true.
|
||||||
if self.payload_inclusion_list_satisfaction.get(&fc_node.root) == Some(&false) {
|
if !self
|
||||||
|
.payload_inclusion_list_satisfaction
|
||||||
|
.get(&fc_node.root)
|
||||||
|
.copied()
|
||||||
|
.unwrap_or(false)
|
||||||
|
{
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user