尝试在主网配置(需要真实地址结构)上运行本地比特币测试节点,发送交易,并在我的本地内存池中列出,但不输入下一个区块。
重要提示:我必须从Internet上的其他节点禁用该节点的更新,所以我只能创建自己的块!
我是怎么做到的:
./bitcoind -conf=/home/ubuntu/.bitcoin/bitcoin.conf
./bitcoin-cli -rpcwallet="" settxfee 0.1
./bitcoin-cli -rpcwallet="" sendtoaddress "<address>" 1
./bitcoin-cli generatetoaddress 1 <......> 20000000
等待被开采的地块。甚至等了10个街区。
通过哈希检查交易状态:
./bitcoin-cli -rpcwallet="" gettransaction <hash>
"amount": -0.10000000,
"fee": -0.01430000,
"confirmations": 0,
"trusted": true,
"txid": "..................",
"walletconflicts": [
],
"time": 1231408815,
"timereceived": 1231408815,
"bip125-replaceable": "no",
"details": [
{
"address": "..........",
"category": "send",
"amount": -0.10000000,
"vout": 0,
"fee": -0.01430000,
"abandoned": false
}
],
"hex": ".........."
}
./bitcoin-cli getrawmempool
./bitcoin-cli getblocktemplate
error code: -9
error message:
Bitcoin Core is not connected!
状态:
Bitcoin Core RPC client version v0.19.1
Ubuntu 18.04 bionic
感谢您的投入。