Btcd交互式工具btcctl的一些常用命令
前言
上一篇文章介绍了单节点和双节点的btcd使用,也用btcctl命令做了一些交互。
这篇文章介绍一些btcctl我至今经常用的命令。
本文章不定期更新
命令概览
通过btcctl -l
可以看到所有的btcctl的命令
Chain Server Commands:
addnode "addr" "add|remove|onetry"
createrawtransaction [{"txid":"value","vout":n},...] {"address":amount,...} (locktime)
debuglevel "levelspec"
decoderawtransaction "hextx"
decodescript "hexscript"
generate numblocks
getaddednodeinfo dns ("node")
getbestblock
getbestblockhash
getblock "hash" (verbose=true verbosetx=false)
getblockchaininfo
getblockcount
getblockhash index
getblockheader "hash" (verbose=true)
getblocktemplate ({"mode":"value","capabilities":["capability",...],"longpollid":"value","sigoplimit":sigoplimit,"sizelimit":sizelimit,"maxversion":n,"target":"value","data":"value","workid":"value"})
getcfilter "hash" filtertype
getcfilterheader "hash" filtertype
getchaintips
getconnectioncount
getcurrentnet
getdifficulty
getgenerate
gethashespersec
getheaders ["blocklocator",...] "hashstop"
getinfo
getmempoolentry "txid"
getmempoolinfo
getmininginfo
getnettotals
getnetworkhashps (blocks=120 height=-1)
getnetworkinfo
getpeerinfo
getrawmempool (verbose=false)
getrawtransaction "txid" (verbose=0)
gettxout "txid" vout (includemempool=true)
gettxoutproof ["txid",...] ("blockhash")
gettxoutsetinfo
getwork ("data")
help ("command")
invalidateblock "blockhash"
node "connect|remove|disconnect" "target" ("perm|temp")
ping
preciousblock "blockhash"
reconsiderblock "blockhash"
searchrawtransactions "address" (verbose=1 skip=0 count=100 vinextra=0 reverse=false ["filteraddr",...])
sendrawtransaction "hextx" (allowhighfees=false)
setgenerate generate (genproclimit=-1)