Skip to content

Commit

Permalink
Revert "Disable blocknumberprefix on headerdb"
Browse files Browse the repository at this point in the history
This reverts commit 9894ef2.
  • Loading branch information
kamilchodola committed Dec 8, 2023
1 parent bcd3b8a commit f91bfa3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Nethermind/Nethermind.Blockchain/Headers/HeaderStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ public HeaderStore(IDb headerDb, IDb blockNumberDb)
public void Insert(BlockHeader header)
{
using NettyRlpStream newRlp = _headerDecoder.EncodeToNewNettyStream(header);
// #6261: Disable prefixing key with block number until later version.
// _headerDb.Set(header.Number, header.Hash, newRlp.AsSpan());
// InsertBlockNumber(header.Hash, header.Number);
_headerDb.Set(header.Hash, newRlp.AsSpan());
_headerDb.Set(header.Number, header.Hash, newRlp.AsSpan());
InsertBlockNumber(header.Hash, header.Number);
}

public BlockHeader? Get(Hash256 blockHash, bool shouldCache = false, long? blockNumber = null)
Expand Down

0 comments on commit f91bfa3

Please sign in to comment.