Skip to content
This repository was archived by the owner on Oct 20, 2023. It is now read-only.

fix uncle blokcs are orphaned #1574

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Miningcore/Blockchain/Ethereum/EthereumPayoutHandler.cs
Original file line number Diff line number Diff line change
@@ -158,6 +158,7 @@ public async Task<Block[]> ClassifyBlocksAsync(IMiningPool pool, Block[] blocks,

// execute batch
var blockInfo2s = await FetchBlocks(blockCache, ct, range.ToArray());
var matchUncle = false;

foreach(var blockInfo2 in blockInfo2s)
{
@@ -212,13 +213,19 @@ public async Task<Block[]> ClassifyBlocksAsync(IMiningPool pool, Block[] blocks,
messageBus.NotifyBlockUnlocked(poolConfig.Id, block, coin);
}

else
else {
matchUncle = true;
logger.Info(() => $"[{LogCategory}] Got immature matching uncle for block {blockInfo2.Height.Value}. Will try again.");
}

break;
}
}
}

if (matchUncle)
continue;


if(block.Status == BlockStatus.Pending && block.ConfirmationProgress > 0.75)
{