比特幣(Bitcoin) RPC Mining API中submitheader的用法及代碼示例。
用法:
submitheader "hexdata"
將給定的十六進製數據解碼為標頭,然後將其提交為候選鏈提示(如果有效)。
標頭無效時拋出。
參數1 - hexdata
類型:字符串,必填
hex-encoded塊頭數據
返回結果
None
示例
bitcoin-cli submitheader "aabbcc"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "submitheader", "params": ["aabbcc"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
相關用法
- Bitcoin getblocktemplate用法及代碼示例
- Bitcoin getmininginfo用法及代碼示例
- Bitcoin getnetworkhashps用法及代碼示例
- Bitcoin prioritisetransaction用法及代碼示例
- Bitcoin submitblock用法及代碼示例
注:本文由純淨天空篩選整理自bitcoin.org大神的英文原創作品 Bitcoin submitheader。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。