mirror of
https://github.com/fusion44/blitz_api.git
synced 2026-08-19 12:37:30 +02:00
feat: add support for bitcoin regtest
This commit is contained in:
parent
ecfaadd0c1
commit
268bcf5072
2 changed files with 9 additions and 1 deletions
|
|
@ -57,17 +57,21 @@ shell_script_path = /home/admin
|
|||
# leave commented if no password is used
|
||||
# redis_password=my_password
|
||||
|
||||
# mainnet or testnet
|
||||
# mainnet, testnet or regtest
|
||||
network=testnet
|
||||
bitcoind_ip_mainnet=192.168.1.18
|
||||
bitcoind_ip_testnet=192.168.1.18
|
||||
bitcoind_ip_regtest=192.168.1.18
|
||||
bitcoind_port_rpc_mainnet=8332
|
||||
bitcoind_port_rpc_testnet=18332
|
||||
bitcoind_port_rpc_regtest=28332
|
||||
|
||||
# The API can either hashblock OR rawblock to be notified of new blocks.
|
||||
# Hashblock is a bit faster, so it should be used if possible.
|
||||
bitcoind_zmq_block_rpc="hashblock"
|
||||
bitcoind_zmq_block_port_mainnet=28332
|
||||
bitcoind_zmq_block_port_testnet=28332
|
||||
bitcoind_zmq_block_port_regtest=28332
|
||||
bitcoind_user=raspibolt
|
||||
bitcoind_pw=please_please_update_me_please
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ class _BitcoinConfig:
|
|||
self.ip = config("bitcoind_ip_testnet")
|
||||
self.rpc_port = config("bitcoind_port_rpc_testnet")
|
||||
self.zmq_port = config("bitcoind_zmq_block_port_testnet")
|
||||
elif self.network == "regtest":
|
||||
self.ip = config("bitcoind_ip_regtest")
|
||||
self.rpc_port = config("bitcoind_port_rpc_regtest")
|
||||
self.zmq_port = config("bitcoind_zmq_block_port_regtest")
|
||||
else:
|
||||
self.ip = config("bitcoind_ip_mainnet")
|
||||
self.rpc_port = config("bitcoind_port_rpc_mainnet")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue