Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/blockchain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ impl BlockChainServer {
// this the aggregator never sees its own validator's signature in
// gossip_signatures and it is excluded from aggregated proofs.
if self.is_aggregator {
let _ = store::on_gossip_attestation(&mut self.store, signed_attestation.clone())
let _ = store::on_gossip_attestation(&mut self.store, &signed_attestation)
.inspect_err(|err| {
warn!(%slot, %validator_id, %err, "Self-delivery of attestation failed")
});
Expand Down Expand Up @@ -488,7 +488,7 @@ impl BlockChainServer {
}
}

fn on_gossip_attestation(&mut self, attestation: SignedAttestation) {
fn on_gossip_attestation(&mut self, attestation: &SignedAttestation) {
if !self.is_aggregator {
warn!("Received unaggregated attestation but node is not an aggregator");
return;
Expand Down Expand Up @@ -553,7 +553,7 @@ impl Handler<NewBlock> for BlockChainServer {

impl Handler<NewAttestation> for BlockChainServer {
async fn handle(&mut self, msg: NewAttestation, _ctx: &Context<Self>) {
self.on_gossip_attestation(msg.attestation);
self.on_gossip_attestation(&msg.attestation);
}
}

Expand Down
4 changes: 2 additions & 2 deletions crates/blockchain/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ pub fn on_tick(
/// at interval 2. Only aggregator nodes receive unaggregated gossip attestations.
pub fn on_gossip_attestation(
store: &mut Store,
signed_attestation: SignedAttestation,
signed_attestation: &SignedAttestation,
) -> Result<(), StoreError> {
let validator_id = signed_attestation.validator_id;
let attestation = Attestation {
validator_id,
data: signed_attestation.data,
data: signed_attestation.data.clone(),
};
validate_attestation_data(store, &attestation.data)
.inspect_err(|_| metrics::inc_attestations_invalid())?;
Expand Down
Loading