Skip to content

Commit

Permalink
Ensure correct chainparams for privkeys in Qt
Browse files Browse the repository at this point in the history
Since the chain parameters setting is thread-local,
we must reapply it (for testing) in the show_privkeys
thread (note, this is the only separate thread currently
used in the Qt app, and there is none in the command line).
  • Loading branch information
AdamISZ committed Apr 18, 2020
1 parent 28313a5 commit 2a10e86
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/joinmarket-qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,12 @@ def exportPrivkeysJson(self):
done = False

def privkeys_thread():
# To explain this (given setting was already done in
# load_program_config), see:
# https://github.com/Simplexum/python-bitcointx/blob/9f1fa67a5445f8c187ef31015a4008bc5a048eea/bitcointx/__init__.py#L242-L243
# note, we ignore the return value as we only want to apply
# the chainparams setting logic:
get_blockchain_interface_instance(jm_single().config)
for addr in addresses:
time.sleep(0.1)
if done:
Expand Down

0 comments on commit 2a10e86

Please sign in to comment.