首页 > 编程知识 正文

bitcoin官网,bitcoin挖矿客户端

时间:2023-05-05 18:19:18 阅读:250789 作者:1070

1. 安装比特币客户端2. 启动客户端,并同步testnet 2.1. 新建bitcoin.conf2.2. 启动客户端 3. 常用命令 3.1. getnetworkinfo3.2. getpeerinfo3.3. getblockchaininfo3.4. listaddressgroupings3.5. listunspent3.6. getwalletinfo 1. 安装比特币客户端 brew install bitcoin 2. 启动客户端,并同步testnet 2.1. 新建bitcoin.conf

选定一个存储数据的目录,例如/xxx/btc,在此目录下新建bitcoin.conf:

$ cat bitcoin.conftestnet=1server=1rpcuser=hello2maorpcpassword=123 2.2. 启动客户端 bitcoind -datadir=/xxx/btc 3. 常用命令 3.1. getnetworkinfo bitcoin-cli -rpcport=18332 -rpcuser=hello2mao -rpcpassword=123 getnetworkinfo

Output:

{ "version": 180100, "subversion": "/Satoshi:0.18.1/", "protocolversion": 70015, "localservices": "000000000000040d", "localrelay": true, "timeoffset": 0, "networkactive": true, "connections": 8, "networks": [ { "name": "ipv4", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "ipv6", "limited": false, "reachable": true, "proxy": "", "proxy_randomize_credentials": false }, { "name": "onion", "limited": true, "reachable": false, "proxy": "", "proxy_randomize_credentials": false } ], "relayfee": 0.00001000, "incrementalfee": 0.00001000, "localaddresses": [ ], "warnings": "Warning: unknown new rules activated (versionbit 28)"} 3.2. getpeerinfo bitcoin-cli -rpcport=18332 -rpcuser=hello2mao -rpcpassword=123 getpeerinfo

Output:Output:

{ "chain": "test", "blocks": 1580718, "headers": 1580718, "bestblockhash": "00000000000001b4c7f414fceb0105a016b679040d83af501c62717e2b95b1ed", "difficulty": 4453199.07071689, "mediantime": 1570498098, "verificationprogress": 0.9999985435389783, "initialblockdownload": false, "chainwork": "00000000000000000000000000000000000000000000012b544262d1fcad7ff9", "size_on_disk": 25483259703, "pruned": false, "softforks": [ { "id": "bip34", "version": 2, "reject": { "status": true } }, { "id": "bip66", "version": 3, "reject": { "status": true } }, { "id": "bip65", "version": 4, "reject": { "status": true } } ], "bip9_softforks": { "csv": { "status": "active", "startTime": 1456790400, "timeout": 1493596800, "since": 770112 }, "segwit": { "status": "active", "startTime": 1462060800, "timeout": 1493596800, "since": 834624 } }, "warnings": "Warning: unknown new rules activated (versionbit 28)"} 3.4. listaddressgroupings bitcoin-cli -rpcport=18332 -rpcuser=hello2mao -rpcpassword=123 listaddressgroupings

Output:Output:Output:

{ "walletname": "", "walletversion": 169900, "balance": 0.04862123, "unconfirmed_balance": 0.00000000, "immature_balance": 0.00000000, "txcount": 10, "keypoololdest": 1569749992, "keypoolsize": 1000, "keypoolsize_hd_internal": 1000, "paytxfee": 0.00000000, "hdseedid": "496e12e58366b15bb25e3a8b7ef64a161f0ee735", "private_keys_enabled": true}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。