美文网首页
比特币命令

比特币命令

作者: 坠叶飘香 | 来源:发表于2018-07-25 21:06 被阅读0次

    1.启动 bitcoind server

    后面的bitcoin-cli命令的执行必须也带上-regtest,否则会提示你没有连上。

    加了daemon参数后,添加的log在终端看不到(找了好久才想明白这个原因)
    admin07@admin-MS:~/job/github_source/bitcoin/src$ bitcoind -regtest -daemon
    Bitcoin server starting
    

    停止:

    admin07@admin-MS:~/job/github_source/bitcoin/src$ ./bitcoin-cli -regtest stop
    Bitcoin server stopping
    

    2.查看子命令

    admin07@admin-MS:~/job/github_source/bitcoin/src$ bitcoin-cli -regtest help
    

    3. 挖矿

    admin07@admin-MS:~/job/github_source/bitcoin/src$ bitcoin-cli -regtest generate 110
    [
      "702a3ff8dd46686a77782af0cb2202ac4aacaa24d52d239e6a566f3160df8937",
      "04b88bdd21452ad7971a4fe1fd8bb697b5315df5907268a11afa72578673bcbc",
      "60f95af2293c99af72dcaead2dae60b6349e5d75e010e9ac623b4d55ef34f5a6",
      "418b5667aa91c205b80e1b6d82392e56259adc2138eda836fe1523aea93d0f39",
      "6e81fef6ff1906f7fc93a7e877fe1c337677c5d30ee0c55e463ea04c96a2858a",
      "4fdb4d558c2c15e6e811499dc9eb73a06e97fd654d97aa1e1ed6b1e01df25865",
      "7191314b7b566cc9b1205d26ea5c2df2aaba649ddf95250cf931583f41ae6942",
      "11c42c589d9e2336e8d035a14c984bef7174a98d031ea5c763e9bb0640a63949",
      "3685806eecce44c3b82052ea4162c839cce064bbbaf1372e2115f6e523f02cd5",
      "4561f1f5da09844674393686247bc181b05b5203b45f21fb77a0dc907aac7289",
       ......
       "42b7348bdcfa32aea6793b6decee000b99f1b66efaca0191d4f5e8f9e582b335",
      "6738142d8d275afbf84e6737c4a150dbc83fcfe3e04cfecf46b5ffb09a0ac773"
    ]
    

    4.余额

    admin07@admin-MS:~/job/github_source/bitcoin/src$ bitcoin-cli -regtest getbalance
    500.00000000
    

    5.账户地址

    admin07@admin-MS:~/liang/job/github_source/bitcoin/src$ bitcoin-cli -regtest listaddressgroupings
    [
      [
        [
          "mwp76DE5TLKnXTxNRgFowaPDHt8AiB27ip",
          0.00000000
        ]
      ],
      [
        [
          "myTzmUehMapJQzhccouy4wVGtgXG44vdQg",
          500.00000000
        ]
      ]
    ]
    

    相关文章

      网友评论

          本文标题:比特币命令

          本文链接:https://www.haomeiwen.com/subject/ouymmftx.html