Conflux-Chain / conflux-doc

documentations
23 stars 21 forks source link

mining.notify format is different than in docs #48

Open ma7555 opened 3 years ago

ma7555 commented 3 years ago

Actual mining.notify:

  {
 "id": 316399, 
"method": "mining.notify", 
"params": 
[
"0xce93239b792b149ae5ee664883fa42ce01f94c4759d666fb096627732a309914", 
"4985137", 
"0xce93239b792b149ae5ee664883fa42ce01f94c4759d666fb096627732a309914",
"0x2641ed57a336dee002ccf83f2b4c1c0d0a7fb3f49cdefaec33d5780"
] 
}

Docs:

Parameters JOB_ID, hex-string - the identifier of the job. HASH, 32-bytes - the hash of the PoW problem. BOUNDARY, U256 - the difficulty boundary of the problem. For a nonce to be valid, the resulting hash must be smaller than the BOUNDARY. Example

  // Request
  '{
"jsonrpc":"2.0",
"method":"mining.notify",
"params":
[
"0x4e08db21d43a7696afa3d00ed948568210f3ab3f34673f1d17198625ec175a9c",
"0x4e08db21d43a7696afa3d00ed948568210f3ab3f34673f1d17198625ec175a9c",
"0x1a4e3422948568210f3ab3f34673f1d17198625ec175a9c"
],
"id":3}'

Please update the docs with the correct params representation

Pana commented 2 years ago

@peilun-conflux