Add additional logs to validator client

This commit is contained in:
Paul Hauner
2019-09-10 17:40:21 -04:00
parent b33f9c2bc9
commit 3fe61f5044
6 changed files with 37 additions and 7 deletions

View File

@@ -1386,10 +1386,14 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
new_head.beacon_state.build_all_caches(&self.spec)?;
trace!(self.log, "Taking write lock on head");
// Update the checkpoint that stores the head of the chain at the time it received the
// block.
*self.canonical_head.write() = new_head;
trace!(self.log, "Dropping write lock on head");
// Save `self` to `self.store`.
self.persist()?;

View File

@@ -25,8 +25,8 @@ impl<T: BeaconChainTypes> ValidatorService for ValidatorServiceInstance<T> {
req: GetDutiesRequest,
sink: UnarySink<GetDutiesResponse>,
) {
let validators = req.get_validators();
trace!(self.log, "RPC request"; "endpoint" => "GetValidatorDuties", "epoch" => req.get_epoch());
let validators = req.get_validators();
let epoch = Epoch::from(req.get_epoch());
let slot = epoch.start_slot(T::EthSpec::slots_per_epoch());