diff --git a/src/node/dvfcore.rs b/src/node/dvfcore.rs index 6a108cc..b55fb4d 100644 --- a/src/node/dvfcore.rs +++ b/src/node/dvfcore.rs @@ -149,7 +149,6 @@ pub struct DvfDutyCheckMessage { pub data: Vec, #[serde(skip_serializing_if = "Option::is_none")] pub sign_hex: Option, - pub pubkey: Option> } impl DvfDutyCheckMessage { @@ -417,23 +416,19 @@ impl MessageHandler for DvfDutyCheckHandler { } }; let fee_recipient = block.body().execution_payload().unwrap().fee_recipient(); - - match check_msg.pubkey { - Some(pubkey) => { - info!("block proposal full block, va pubic key {}, fee recipient {}", hex::encode(&pubkey), format!("{0:0x}", fee_recipient)); - if !self.db.check_validator_fee_recipient(pubkey, fee_recipient).await.unwrap() { - reply( - writer, - DutySafety::Invalid, - format!("fee recipient is not consistent"), - ) - .await; - error!("fee recipient is not consistent"); - return Ok(()); - } - } - None => {} + let pubkey = self.validator_pk.serialize().to_vec(); + info!("block proposal full block, va pubic key {}, fee recipient {}", hex::encode(&pubkey), format!("{0:0x}", fee_recipient)); + if !self.db.check_validator_fee_recipient(pubkey, fee_recipient).await.unwrap() { + reply( + writer, + DutySafety::Invalid, + format!("fee recipient is not consistent"), + ) + .await; + error!("fee recipient is not consistent"); + return Ok(()); } + self.sign_block(writer, block, check_msg.domain_hash).await; } BlockType::Blinded => { @@ -612,8 +607,7 @@ impl DvfSigner { domain_hash, check_type, data: data.to_vec(), - sign_hex: None, - pubkey: Some(self.validator_public_key().serialize().to_vec()) + sign_hex: None }; match msg.sign_digest(&self.node_secret) { Ok(sign_hex) => msg.sign_hex = Some(sign_hex),