electrum-personal-server

Maximally lightweight electrum server for a single user
git clone https://git.parazyd.org/electrum-personal-server
Log | Files | Refs | README

commit e8b48e42240f34364faf49abfa54dcac4a5e070c
parent 12e105a4c6ac1b9ce5b40d9ba32701a57a9dc589
Author: chris-belcher <chris-belcher@users.noreply.github.com>
Date:   Mon,  5 Nov 2018 21:31:49 +0000

Check whether the wallet RPC calls exist

Bitcoin Core when compiled from source has wallet disabled by default.
This has tripped up a few people when setting up EPS, see issue #61.

Diffstat:
Melectrumpersonalserver/server/common.py | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/electrumpersonalserver/server/common.py b/electrumpersonalserver/server/common.py @@ -648,7 +648,12 @@ def main(): logger.error("Error with bitcoin json-rpc: " + repr(e)) printed_error_msg = True time.sleep(5) - + try: + rpc.call("listunspent", []) + except JsonRpcError: + logger.error("Wallet related RPC calls not found, looks like the " + + "bitcoin node was compiled with the disable wallet flag") + return import_needed, relevant_spks_addrs, deterministic_wallets = \ get_scriptpubkeys_to_monitor(rpc, config) if import_needed: