比特幣(Bitcoin) RPC Blockchain API中pruneblockchain的用法及代碼示例。
用法:
pruneblockchain height
參數1 - height
類型:數字,必填
- 修剪的塊高。可以設置為不連續的高度,也可以設置為unix時間戳
修剪塊時間比提供的時間戳至少早2個小時的塊。
返回結果
名稱 |
類型 |
描述 |
---|---|---|
n |
numeric |
最後一個塊的高度被修剪。 |
示例
bitcoin-cli pruneblockchain 1000
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "pruneblockchain", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
相關用法
- Bitcoin getbestblockhash用法及代碼示例
- Bitcoin getblock用法及代碼示例
- Bitcoin getblockchaininfo用法及代碼示例
- Bitcoin getblockcount用法及代碼示例
- Bitcoin getblockhash用法及代碼示例
- Bitcoin getblockheader用法及代碼示例
- Bitcoin getblockstats用法及代碼示例
- Bitcoin getchaintips用法及代碼示例
- Bitcoin getchaintxstats用法及代碼示例
- Bitcoin getdifficulty用法及代碼示例
- Bitcoin getmempoolancestors用法及代碼示例
- Bitcoin getmempooldescendants用法及代碼示例
- Bitcoin getmempoolentry用法及代碼示例
- Bitcoin getmempoolinfo用法及代碼示例
- Bitcoin getrawmempool用法及代碼示例
- Bitcoin gettxout用法及代碼示例
- Bitcoin gettxoutproof用法及代碼示例
- Bitcoin gettxoutsetinfo用法及代碼示例
- Bitcoin preciousblock用法及代碼示例
- Bitcoin savemempool用法及代碼示例
- Bitcoin scantxoutset用法及代碼示例
- Bitcoin verifychain用法及代碼示例
注:本文由純淨天空篩選整理自bitcoin.org大神的英文原創作品 Bitcoin pruneblockchain。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。