Skip to content

Commit

Permalink
fix small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonKoerner committed Feb 29, 2024
1 parent d53b840 commit de2256d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Discreet/Network/Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Discreet.DB;
using Discreet.Network.Core;
using Discreet.Network.Core.Packets;
using RocksDbSharp;

namespace Discreet.Network
{
Expand Down Expand Up @@ -1445,6 +1446,8 @@ public async Task HandleBlocks(BlocksPacket p, Peerbloom.Connection conn)

/* orphan data is valid; validate branch and publish changes */
Daemon.Logger.Info($"HandleBlocks: Root found for orphan branch beginning with block {p.Blocks[0].Header.BlockHash.ToHexShort()}", verbose: 1);
MessageCache.GetMessageCache().OrphanBlockParents.Remove(p.Blocks[0].Header.BlockHash, out _);

try
{
await vCache.Flush();
Expand Down Expand Up @@ -1659,6 +1662,7 @@ public async Task AcceptOrphans(Cipher.SHA256 bHash)
if (err is OrphanBlockException)
{
// simply return
Daemon.Logger.Info($"AcceptOrphans: orphan block remains at height {block.Header.Height}", verbose: 3);
return;
}
if (err != null)
Expand Down

0 comments on commit de2256d

Please sign in to comment.