mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Submit ptc votes that we produce to the ptc op pool (#9231)
We are not submitting ptc votes that we produce to our lcoal ptc op pool. So when we are the block producer we don't include our own ptc votes! Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu>
This commit is contained in:
@@ -629,6 +629,13 @@ fn publish_payload_attestation_messages<T: BeaconChainTypes>(
|
||||
"Payload attestation invalid for fork choice"
|
||||
);
|
||||
}
|
||||
|
||||
if let Err(e) = chain.add_payload_attestation_to_pool(&verified) {
|
||||
warn!(
|
||||
reason = ?e,
|
||||
"Failed to add payload attestation to pool"
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(PayloadAttestationError::PriorPayloadAttestationMessageKnown { .. }) => {
|
||||
num_already_known += 1;
|
||||
|
||||
@@ -2846,6 +2846,8 @@ impl ApiTester {
|
||||
let message = self.make_valid_payload_attestation_message(0);
|
||||
let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot);
|
||||
|
||||
let pool_count_before = self.chain.op_pool.num_payload_attestation_messages();
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations(&[message], fork_name)
|
||||
.await
|
||||
@@ -2856,6 +2858,12 @@ impl ApiTester {
|
||||
"valid payload attestation should be sent to network"
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
self.chain.op_pool.num_payload_attestation_messages(),
|
||||
pool_count_before + 1,
|
||||
"payload attestation should be added to op pool"
|
||||
);
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
@@ -2863,6 +2871,8 @@ impl ApiTester {
|
||||
let message = self.make_valid_payload_attestation_message(1);
|
||||
let fork_name = self.chain.spec.fork_name_at_slot::<E>(message.data.slot);
|
||||
|
||||
let pool_count_before = self.chain.op_pool.num_payload_attestation_messages();
|
||||
|
||||
self.client
|
||||
.post_beacon_pool_payload_attestations_ssz(&[message], fork_name)
|
||||
.await
|
||||
@@ -2873,6 +2883,12 @@ impl ApiTester {
|
||||
"valid payload attestation (SSZ) should be sent to network"
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
self.chain.op_pool.num_payload_attestation_messages(),
|
||||
pool_count_before + 1,
|
||||
"payload attestation should be added to op pool"
|
||||
);
|
||||
|
||||
self
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user