Skip to content

Commit

Permalink
SignerPowMiner improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
IxiAngel committed Dec 21, 2024
1 parent 283c38d commit d2917ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
23 changes: 0 additions & 23 deletions IxianDLT/Block/BlockProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4131,28 +4131,5 @@ public ulong determineHighestNetworkBlockNum()
}
return netBh;
}

public BlockSignature updateBlockSignature()
{
lock (localBlockLock)
{
if (localNewBlock == null)
{
return null;
}

BlockSignature signatureData = localNewBlock.applySignature(PresenceList.getPowSolution());
if (signatureData == null)
{
Logging.error("Could not update block signature {0}.", localNewBlock.blockNum);
return null;
}

Node.inventoryCache.setProcessedFlag(InventoryItemTypes.blockSignature, InventoryItemSignature.getHash(signatureData.recipientPubKeyOrAddress.addressNoChecksum, localNewBlock.blockChecksum), true);
SignatureProtocolMessages.broadcastBlockSignature(signatureData, localNewBlock.blockNum, localNewBlock.blockChecksum, null, null);

return signatureData;
}
}
}
}
2 changes: 1 addition & 1 deletion IxianDLT/Miner/SignerPowMiner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ private void sendFoundSolution()
}

PresenceList.setPowSolution(newSolution);
Node.blockProcessor.updateBlockSignature();
Node.blockProcessor.acceptLocalNewBlock();
}
}
}

0 comments on commit d2917ea

Please sign in to comment.