mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
Add logs for debugging
This commit is contained in:
@@ -454,6 +454,7 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
parent_hash: ExecutionBlockHash,
|
parent_hash: ExecutionBlockHash,
|
||||||
pubkey: PublicKeyBytes,
|
pubkey: PublicKeyBytes,
|
||||||
) -> Result<SignedBuilderBid<E>, String> {
|
) -> Result<SignedBuilderBid<E>, String> {
|
||||||
|
info!(self.log, "In get_header");
|
||||||
// Check if the pubkey has registered with the builder if required
|
// Check if the pubkey has registered with the builder if required
|
||||||
if self.validate_pubkey && !self.val_registration_cache.read().contains_key(&pubkey) {
|
if self.validate_pubkey && !self.val_registration_cache.read().contains_key(&pubkey) {
|
||||||
return Err("validator not registered with builder".to_string());
|
return Err("validator not registered with builder".to_string());
|
||||||
@@ -468,6 +469,8 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
None => self.get_payload_params(slot, None, pubkey, None).await?,
|
None => self.get_payload_params(slot, None, pubkey, None).await?,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
info!(self.log, "Got payload params");
|
||||||
|
|
||||||
let fork = self.fork_name_at_slot(slot);
|
let fork = self.fork_name_at_slot(slot);
|
||||||
let payload_response_type = self
|
let payload_response_type = self
|
||||||
.el
|
.el
|
||||||
@@ -481,6 +484,8 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.map_err(|e| format!("couldn't get payload {:?}", e))?;
|
.map_err(|e| format!("couldn't get payload {:?}", e))?;
|
||||||
|
info!(self.log, "Got payload message");
|
||||||
|
info!(self.log, "fork {}", fork);
|
||||||
|
|
||||||
let mut message = match payload_response_type {
|
let mut message = match payload_response_type {
|
||||||
crate::GetPayloadResponseType::Full(payload_response) => {
|
crate::GetPayloadResponseType::Full(payload_response) => {
|
||||||
@@ -539,8 +544,10 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if self.apply_operations {
|
if self.apply_operations {
|
||||||
|
info!(self.log, "Applying operations");
|
||||||
self.apply_operations(&mut message);
|
self.apply_operations(&mut message);
|
||||||
}
|
}
|
||||||
|
info!(self.log, "Signing builder message");
|
||||||
|
|
||||||
let mut signature = message.sign_builder_message(&self.builder_sk, &self.spec);
|
let mut signature = message.sign_builder_message(&self.builder_sk, &self.spec);
|
||||||
|
|
||||||
@@ -548,6 +555,7 @@ impl<E: EthSpec> MockBuilder<E> {
|
|||||||
signature = Signature::empty();
|
signature = Signature::empty();
|
||||||
};
|
};
|
||||||
let signed_bid = SignedBuilderBid { message, signature };
|
let signed_bid = SignedBuilderBid { message, signature };
|
||||||
|
info!(self.log, "Builder bid {:?}", &signed_bid.message);
|
||||||
Ok(signed_bid)
|
Ok(signed_bid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user