Make sure block effort is always computed
@@ -119,6 +119,10 @@ namespace MiningCore.Payments
await cf.RunTxAsync(async (con, tx) =>
{
+ // fill block effort if empty
+ if (!block.Effort.HasValue)
+ await CalculateBlockEffort(pool, block, handler);
+
switch (block.Status)
{
case BlockStatus.Confirmed:
@@ -138,9 +142,6 @@ namespace MiningCore.Payments
break;
case BlockStatus.Pending:
- if (!block.Effort.HasValue)
- await CalculateBlockEffort(pool, block, handler);
-
blockRepo.UpdateBlock(con, tx, block);
break;
}
