Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
realbigsean committed Jun 30, 2022
1 parent a94c0b9 commit ac15207
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3218,13 +3218,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
let slot = state.slot();
let proposer_index = state.get_beacon_proposer_index(state.slot(), &self.spec)? as u64;

let pubkey_opt = match self.validator_pubkey_bytes(proposer_index as usize) {
Ok(p) => p,
Err(e) => {
warn!(self.log, "Can't access proposer's pubkey, cannot use external builder"; "error" => ?e);
None
}
};
let pubkey_opt = state
.validators()
.get(proposer_index as usize)
.map(|v| v.pubkey);

// Closure to fetch a sync aggregate in cases where it is required.
let get_sync_aggregate = || -> Result<SyncAggregate<_>, BlockProductionError> {
Expand Down

0 comments on commit ac15207

Please sign in to comment.