Verify Mining Solution

Verify Mining Solution

Checks the given solution against the block's difficulty field to determine if it is valid.

Method: verifyminingsolution

Input parameters:

ParameterTypeRequiredDescription
nonceStringYesNonce value which satisfies the difficulty.
blocknumNumberYesSolved block number.
diffNumberYesDifficulty value.

Errors:

ErrorDescription
RPC_INVALID_PARAMETEROne or more of the required parameters are missing.
RPC_INTERNAL_ERRORAn unknown error occurred in the node. Please check the node log for details.

Output:

  • success: Boolean value true or false in the result field
  • fail: JSON encoded error details and the result field set to null

Example:

GET http://localhost:8081/verifyminingsolution?nonce=ca82dacd91...6460d20b7b2a&blocknum=55&diff=18442206887586635022

{
    "result": true,
    "error": null,
    "id": null
}