Skip to content

Commit

Permalink
Geyser: return real parent blockhash, or default (#33873)
Browse files Browse the repository at this point in the history
Return real parent blockhash, or default
  • Loading branch information
CriesofCarrots authored Nov 6, 2023
1 parent 75e598e commit d6ac9be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/replay_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2952,9 +2952,13 @@ impl ReplayStage {
Self::record_rewards(bank, rewards_recorder_sender);
if let Some(ref block_metadata_notifier) = block_metadata_notifier {
let block_metadata_notifier = block_metadata_notifier.read().unwrap();
let parent_blockhash = bank
.parent()
.map(|bank| bank.last_blockhash())
.unwrap_or_default();
block_metadata_notifier.notify_block_metadata(
bank.parent_slot(),
&bank.parent_hash().to_string(),
&parent_blockhash.to_string(),
bank.slot(),
&bank.last_blockhash().to_string(),
&bank.rewards,
Expand Down

0 comments on commit d6ac9be

Please sign in to comment.