CentOS stream 9: bitcoin-core の regtestで送金を行う その 4

38. daemon restart
-fallbackfee=0.0002

$ cd /home/user02/dev/
$ bitcoin-core.daemon -regtest -conf=/home/user02/dev/alice/bitcoin.conf -datadir=./alice/ -rpcport=10001 -port=10011 -fallbackfee=0.0002
$ bitcoin-core.daemon -regtest -conf=/home/user02/dev/bob/bitcoin.conf -datadir=./bob -rpcport=10002 -listen=0 -connect=127.0.0.1:10011  -fallbackfee=0.0002

39. daemonを再起動したら、loadwalletが必要
– 不要なargumentを無くした

$ bitcoin-core.cli -regtest -rpcport=10001 loadwallet "AliceWallet"
{
  "name": "AliceWallet",
  "warning": ""
}
$ bitcoin-core.cli -regtest -rpcport=10002 loadwallet "BobWallet"
Wallet"
{
  "name": "BobWallet",
  "warning": ""
}

40. aliceからbobに 0.2/BTC 送金
– estimate_mode=”unset”
– fee_rate=1.1
– Success

$ bitcoin-core.cli -regtest -rpcport=10002 getbalance
2.09996236
$ bitcoin-core.cli -regtest  -rpcport=10001 -named sendtoaddress address="bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p" amount=0.2 comment="drinks-4" comment_to="room82" subtractfeefromamount=false replaceable=true conf_target=null estimate_mode="unset" avoid_reuse=false fee_rate=1.1
35820c78ab235294198352e9474c17ecc477db1ba66fb27d206fd66efb238053
$ bitcoin-core.cli -regtest  -rpcport=10001  generatetoaddress 1 bcrt1qht58vxn8avnek2ya3wfpyv65qml9q7l5a6lpek
[
  "6e46966ee430911866425f237c21a37ea629d6b4d1cb4698e549432f0f3d3479"
]
$ bitcoin-core.cli -regtest -rpcport=10002 getbalance
2.29996236
$
$ bitcoin-core.cli -regtest -rpcport=10001 gettransaction  35820c78ab235294198352e9474c17ecc477db1ba66fb27d206fd66efb238053
{
  "amount": -0.20000000,
  "fee": -0.00002422,
  "confirmations": 3,
  "blockhash": "6e46966ee430911866425f237c21a37ea629d6b4d1cb4698e549432f0f3d3479",
  "blockheight": 5865,
  "blockindex": 1,
  "blocktime": 1660178022,
  "txid": "35820c78ab235294198352e9474c17ecc477db1ba66fb27d206fd66efb238053",
  "walletconflicts": [
  ],
  "time": 1660177999,
  "timereceived": 1660177999,
  "bip125-replaceable": "no",
  "comment": "drinks-4",
  "to": "room82",
  "details": [
    {
      "address": "bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p",
      "category": "send",
      "amount": -0.20000000,
      "vout": 0,
      "fee": -0.00002422,
      "abandoned": false
    }
  ],
  "hex": 省略
}

41. 再度、aliceからbobに 0.2/BTC 送金
– estimate_mode=”economical”
– fee_rate 無し
– Success

$ bitcoin-core.cli -regtest  -rpcport=10001 -named sendtoaddress address="bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p" amount=0.2 comment="drinks-4" comment_to="room82" subtractfeefromamount=false replaceable=true conf_target=null estimate_mode="economical" avoid_reuse=false
5b7e195193eecde289e0ecb6c9e199552ee1a97829085f71ff223bf3974f7a92
$ bitcoin-core.cli -regtest  -rpcport=10001  generatetoaddress 1 bcrt1qht58vxn8avnek2ya3wfpyv65qml9q7l5a6lpek
[
  "02bee13f4b09bd86ef0ddd8fb436447ab86dd47f55f17f26c9fe46f9a39c8a2c"
]
$ $ bitcoin-core.cli -regtest -rpcport=10002 getbalance
2.49996236
$ bitcoin-core.cli -regtest -rpcport=10001 gettransaction  5b7e195193eecde289e0ecb6c9e199552ee1a97829085f71ff223bf3974f7a92
{
  "amount": -0.20000000,
  "fee": -0.00002820,
  "confirmations": 1,
  "blockhash": "02bee13f4b09bd86ef0ddd8fb436447ab86dd47f55f17f26c9fe46f9a39c8a2c",
  "blockheight": 5866,
  "blockindex": 1,
  "blocktime": 1660178770,
  "txid": "5b7e195193eecde289e0ecb6c9e199552ee1a97829085f71ff223bf3974f7a92",
  "walletconflicts": [
  ],
  "time": 1660178705,
  "timereceived": 1660178705,
  "bip125-replaceable": "no",
  "comment": "drinks-4",
  "to": "room82",
  "details": [
    {
      "address": "bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p",
      "category": "send",
      "amount": -0.20000000,
      "vout": 0,
      "fee": -0.00002820,
      "abandoned": false
    }
  ],
  "hex": "020000000001012b5124306971d8e79ffe37ad9f31eb27f9152c62f5c0074762bf736191a868250100000000fdffffff02002d3101000000001600149105f2ac25d5640ed983da37e9aa89db5d59168f4e3444bb02000000160014f29144f598cbc76f8e5167a7c7d7bbf843554fa9024730440220338360119197a56e3d928f19810ed94ec49e33ba9f6893d6143bbaeeef01bc3702201559e8bb88d716f805cacadb7d3d20c3d3c649fe15c7216caf425026437caee2012102ad236fd26c9fa91363a42a56cd634e443a30c9dedf108b778e9aa9a917b508f9e9160000"
}

42. 再度、aliceからbobに 0.2/BTC 送金
– estimate_mode=”conservative”
– fee_rate 無し
– Success

$ bitcoin-core.cli -regtest  -rpcport=10001 -named sendtoaddress address="bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p" amount=0.2 comment="drinks-5" comment_to="room83" subtractfeefromamount=false replaceable=true conf_target=null estimate_mode="conservative" avoid_reuse=false
2e4b69128b245ff1e181fb23d25b03498f24fba67b63470b838abfc4a5325cf9
$ bitcoin-core.cli -regtest  -rpcport=10001  generatetoaddress 1 bcrt1qht58vxn8avnek2ya3wfpyv65qml9q7l5a6lpek
[
  "3803fffc4ae389ad5b46cb96c16d5c94b3f3661b77ecc54f5f475acafc47533a"
]
$ bitcoin-core.cli -regtest -rpcport=10002 getbalance
2.69996236
$ bitcoin-core.cli -regtest -rpcport=10001 gettransaction  2e4b69128b245ff1e181fb23d25b03498f24fba67b63470b838abfc4a5325cf9
{
  "amount": -0.20000000,
  "fee": -0.00002820,
  "confirmations": 0,
  "trusted": true,
  "txid": "2e4b69128b245ff1e181fb23d25b03498f24fba67b63470b838abfc4a5325cf9",
  "walletconflicts": [
  ],
  "time": 1660179141,
  "timereceived": 1660179141,
  "bip125-replaceable": "yes",
  "comment": "drinks-5",
  "to": "room83",
  "details": [
    {
      "address": "bcrt1qjyzl9tp964jqakvrmgm7n25fmdw4j950mvxr9p",
      "category": "send",
      "amount": -0.20000000,
      "vout": 0,
      "fee": -0.00002820,
      "abandoned": false
    }
  ],
  "hex": "02000000000101927a4f97f33b22ff715f082978a9e12e5599e1c9b6ece089e2cdee9351197e5b0100000000fdffffff02002d3101000000001600149105f2ac25d5640ed983da37e9aa89db5d59168f4afc12ba0200000016001451970fa55ac75ebabeaa979e28e1e1eca88de73a02473044022011600ab76f69f026bfe61cf6c4c4672d26ca9b6f98825445e117f36dbff265d7022032635003075a3331a4145ecc7638dc047088d919580f466385ae58076746534101210307c17f605acddc71ff78636da077dc7e7b2f3e487f3c860c0e4fb92ce1ba7fa2ea160000"