66. Start daemon
– new login
– -datadir=./dave
– -rpcport=10004
$ cd ~/dev bitcoin-core.daemon -regtest -conf=/home/user03/dev/dave/bitcoin.conf -datadir=./dave -rpcport=10004 -listen=0 -connect=127.0.0.1:10011 -fallbackfee=0.0002
67. create wallet
– new login
– DaveWallet
$ cd ~/dev $ bitcoin-core.cli -regtest -datadir=./dave -rpcport=10004 createwallet "DaveWallet" { "name": "DaveWallet", "warning": "" }
68. new address
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -datadir=./dave -rpcport=10004 getnewaddress bcrt1q8mnq3xzxh25snzdak4zec8khcy5r7kye3tl4kv
69. transfer 10/BTC from alice to dave
$ bitcoin-core.cli -regtest -rpcport=10001 -named sendtoaddress address="bcrt1qhya07e4kejp7phxlnk7rckm5v9skh4jdzuesks" amount=10 comment="drinks-9" comment_to="room89" subtractfeefromamount=false replaceable=true conf_target=null estimate_mode="unset" avoid_reuse=false fee_rate=1.1 887a7c5dcbbd8cc27994f75ab2760ac198833c546bc657d343eb26289b104467 [user02@localhost alice]$ bitcoin-core.cli -regtest -rpcport=10001 -named sendtoaddress address="bcrt1q8mnq3xzxh25snzdak4zec8khcy5r7kye3tl4kv" amount=10 commen t="drinks-10" comment_to="room10" subtractfeefromamount=false replaceable=true conf_target=null estimate_mode="unset" avoid_reuse=false af003b2f506bc9360443e8141db380fa7e1439c144adf642c193c3c2f34a3e62
70. Balance check
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -datadir=./dave -rpcport=10004 getbalance 0.00000000
71. Mining
$ bitcoin-core.cli -regtest -rpcport=10001 generatetoaddress 1 bcrt1qht58vxn8avnek2ya3wfpyv65qml9q7l5a6lpek [ "1b4228f549b2eb5860e2f9aaf46e952b5290c173ae1d11298c59f3be03119939" ]
72. Balance check
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -datadir=./dave -rpcport=10004 getbalance 10.00000000
73.transfer 10/BTC from dave to alice
$ bitcoin-core.cli -regtest -rpcport=10004 -conf=/home/u ser03/dev/dave/bitcoin.conf -named sendtoaddress address="bcrt1qht58vxn8avnek2ya 3wfpyv65qml9q7l5a6lpek" amount=0.1 comment="drinks-11" comment_to="room91" subtr actfeefromamount=false replaceable=true conf_target=null estimate_mode="unset" a void_reuse=false fee_rate=1.1 2adb18379d4e330d9e1d346baa4f9e383991dc3105a51327ab3b058c308402b2
74.Balance check and Mining and Balance
– alice
$ bitcoin-core.cli -regtest -rpcport=10001 getbalance 14927.09977102 $ bitcoin-core.cli -regtest -rpcport=10001 generatetoaddress 1 bcrt1qht58vxn8avnek2ya3wfpyv65qml9q7l5a6lpek [ "4b7b92f2426d6c78ed75319b93541d38ee6912ff35d5b66552f8377adce92a23" ] $ bitcoin-core.cli -regtest -rpcport=10001 getbalance 14927.19977102
75. blockcount
– dave
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -rpcport=10004 getblockcount 5878
76. blockhash
– dave
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -rpcport=10004 getblockhash 0 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
77. block
– dave
$ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -rpcport=10004 getblock 0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 { "hash": "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206", "confirmations": 5879, "height": 0, "version": 1, "versionHex": "00000001", "merkleroot": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", "time": 1296688602, "mediantime": 1296688602, "nonce": 2, "bits": "207fffff", "difficulty": 4.656542373906925e-10, "chainwork": "0000000000000000000000000000000000000000000000000000000000000002", "nTx": 1, "nextblockhash": "03dc5e5356095692bc1d25a9e26d6ad5dbbb801a5b906446ba8951e5c4bd8b89", "strippedsize": 285, "size": 285, "weight": 1140, "tx": [ "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" ] }
78. block
– dave
nextblockhash $ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -rpcport=10004 getblock 03dc5e5356095692bc1d25a9e26d6ad5dbbb801a5b906446ba8951e5c4bd8b89 { "hash": "03dc5e5356095692bc1d25a9e26d6ad5dbbb801a5b906446ba8951e5c4bd8b89", "confirmations": 5878, "height": 1, "version": 536870912, "versionHex": "20000000", "merkleroot": "510ca10638a215ecd718fe127b076611027c72f2be88653139c6ddbd6ac1fe7d", "time": 1660098956, "mediantime": 1660098956, "nonce": 0, "bits": "207fffff", "difficulty": 4.656542373906925e-10, "chainwork": "0000000000000000000000000000000000000000000000000000000000000004", "nTx": 1, "previousblockhash": "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206", "nextblockhash": "516fde5437d5d1b01db98fc0362b3d87f8d4cece4f45886aff2301a3ab8df5de", "strippedsize": 213, "size": 249, "weight": 888, "tx": [ "510ca10638a215ecd718fe127b076611027c72f2be88653139c6ddbd6ac1fe7d" ] }
79. info
– dave
nextblockhash $ $ bitcoin-core.cli -regtest -conf=/home/user03/dev/dave/bitcoin.conf -rpcport=10004 -getinfo Chain: regtest Blocks: 5878 Headers: 5878 Verification progress: 100.0000% Difficulty: 4.656542373906925e-10 Network: in 0, out 1, total 1 Version: 230000 Time offset (s): 0 Proxies: n/a Min tx relay fee rate (BTC/kvB): 0.00001000 Wallet: DaveWallet Keypool size: 4000 Transaction fee rate (-paytxfee) (BTC/kvB): 0.00000000 Balance: 9.89999844 Warnings:
80. listwallets
– alice
$ bitcoin-core.cli -regtest -rpcport=10001 listwallets [ "AliceWallet" ]