Skip to content

Commit

Permalink
v1.17: Geyser: return real parent blockhash, or default (backport of s…
Browse files Browse the repository at this point in the history
…olana-labs#33873) (solana-labs#33959)

Geyser: return real parent blockhash, or default (solana-labs#33873)

Return real parent blockhash, or default

(cherry picked from commit d6ac9be)

Co-authored-by: Tyera <tyera@solana.com>
  • Loading branch information
2 people authored and anwayde committed Nov 16, 2023
1 parent a6e0f10 commit 7210b03
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 @@ -2918,9 +2918,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 7210b03

Please sign in to comment.