Skip to content

Commit bfa0f75

Browse files
kdmukaik9ert
andauthored
Bugfix to restore rpc cookie after bitcoind restart (#967)
Co-authored-by: Kim Neunert <kneunert@gmail.com>
1 parent 9d9d36a commit bfa0f75

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cryptoadvance/specter/specter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ def get_rpc(
6767
if rpc is None:
6868
# check if old rpc is still valid
6969
return old_rpc if old_rpc.test_connection() else None
70-
# check if something have changed
71-
# and return new rpc if so
72-
if rpc.url == old_rpc.url:
70+
# check if something has changed and return new rpc if so.
71+
# RPC cookie will have a new password if bitcoind is restarted.
72+
if rpc.url == old_rpc.url and rpc.password == old_rpc.password:
7373
return old_rpc
7474
else:
7575
logger.info("rpc config have changed.")

0 commit comments

Comments
 (0)