Skip to content

Commit

Permalink
Fix GetBlockData (stratisproject#1079)
Browse files Browse the repository at this point in the history
(cherry picked from commit 17d4520)
  • Loading branch information
quantumagi committed Jan 31, 2023
1 parent fcc3b4e commit 5440972
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Stratis.Bitcoin/Consensus/ConsensusManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,8 @@ public ChainedHeaderBlock[] GetBlockData(List<uint256> blockHashes)

for (int i = 0; i < blocks.Length; i++)
{
ChainedHeaderBlock chainedHeaderBlock = blocks[i];
// Create the chained header block from the chain indexer if required so that the block can still be picked up from the block store.
ChainedHeaderBlock chainedHeaderBlock = blocks[i] ?? new ChainedHeaderBlock(null, this.chainIndexer[blockHashes[i]]);
chainedHeaderBlocks[blockHashes[i]] = chainedHeaderBlock;
}
}
Expand Down

0 comments on commit 5440972

Please sign in to comment.