Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Return real parent blockhash, or default
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyera Eulberg committed Oct 26, 2023
1 parent 70107e2 commit 507cefc
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 @@ -2923,9 +2923,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 507cefc

Please sign in to comment.