commit d4fc10ae73b7ab809eb697e750fbfc8aca308483
parent 1c561c5c7a6351521f87cc7603868ad5efdd587c
Author: nickfarrow <nicholas.w.farrow@gmail.com>
Date: Fri, 14 May 2021 15:58:08 +1000
Added support for specifying wallet in config
Diffstat:
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/config.py b/config.py
@@ -9,6 +9,9 @@ rpcport = "8332"
username = "bitcoinrpc"
password = "RPAPASSWORD"
+# Wallet ("" if single-wallet node, OR wallet name/path as shown in `biitcoin-cli listwallets`)
+wallet = ""
+
# SSH tunnel to node (raspberry pi!)
# Make sure this command works `ssh HOST@IP -q -N -L 8332:localhost:8332`
# This forwards the ports required to talk to the node via RPC (or gRPC in the case of lightning)
diff --git a/pay/bitcoind.py b/pay/bitcoind.py
@@ -11,8 +11,8 @@ class btcd(invoice):
from bitcoinrpc.authproxy import AuthServiceProxy
- connection_str = "http://{}:{}@{}:{}".format(
- config.username, config.password, config.host, config.rpcport
+ connection_str = "http://{}:{}@{}:{}/wallet/{}".format(
+ config.username, config.password, config.host, config.rpcport, config.wallet
)
print("Attempting to connect to {}.".format(connection_str))