110_比特币节点常用命令

比特币节点bitcoin常用命令

1.启动节点

/home/bitcoin/bitcoin-0.17.1/bin/bitcoind --conf=/home/bitcoin/bitcoin.conf

2.查看日志

tail -f /home/bitcoin/datatest/testnet3/debug.log

3.查看区块链信息(比如同步情况、全网难度等)

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 getblockchaininfo

4.查看btc余额

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 getbalance

5.查看已同步的区块数量

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 getblockcount

6.查询指定高度区块的区块hash

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 getblockhash 500000

7.导出指定地址的私钥

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 dumpprivkey "2N75kvCvJF7kgCR92Dg4CeXPJ4KMH5Yx4Cg"

8.按照分组列出钱包中的地址,并携带余额

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 listaddressgroupings

9.获取帮助信息

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 help

10.导入钱包

/home/omnicore-0.5.0/bin/omnicore-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 importwallet '/home/omnicore-0.5.0/bin/walletdump'

11.导出钱包

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 dumpwallet 'walletdump'

12.查看钱包信息

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 getwalletinfo

13.获取钱包列表

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 listwallets

14.创建钱包

/home/bitcoin/bitcoin-0.17.1/bin/bitcoin-cli --datadir=/home/bitcoin/datatest/ --testnet=1 --rpcuser=rabbit --rpcpassword=123456 createwallet rabbit

15.创建新地址

getnewaddress

你可能感兴趣的:(区块链)