mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-13 12:33:40 +02:00
open wallet in read-only mode if possible
This commit is contained in:
parent
c032e46273
commit
8f434b5a9f
1 changed files with 5 additions and 1 deletions
|
|
@ -977,6 +977,8 @@ def wallet_tool_main(wallet_root_path):
|
|||
'history', 'showutxos']
|
||||
methods.extend(noseed_methods)
|
||||
noscan_methods = ['showseed', 'importprivkey', 'dumpprivkey', 'signmessage']
|
||||
readonly_methods = ['display', 'displayall', 'summary', 'showseed',
|
||||
'history', 'showutxos', 'dumpprivkey', 'signmessage']
|
||||
|
||||
if len(args) < 1:
|
||||
parser.error('Needs a wallet file or method')
|
||||
|
|
@ -992,9 +994,11 @@ def wallet_tool_main(wallet_root_path):
|
|||
seed = args[0]
|
||||
wallet_path = get_wallet_path(seed, wallet_root_path)
|
||||
method = ('display' if len(args) == 1 else args[1].lower())
|
||||
read_only = method in readonly_methods
|
||||
|
||||
wallet = open_test_wallet_maybe(
|
||||
wallet_path, seed, options.mixdepths - 1, gap_limit=options.gaplimit)
|
||||
wallet_path, seed, options.mixdepths - 1, read_only=read_only,
|
||||
gap_limit=options.gaplimit)
|
||||
|
||||
if method not in noscan_methods:
|
||||
# if nothing was configured, we override bitcoind's options so that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue