Browse Source

Merge #758: genwallet p2sh -> p2wpkh

0cd8a73a26 genwallet p2sh -> p2wpkh (nixbitcoin)

Pull request description:

  This PR updates `scripts/genwallet.py` to generate native segwit/bech32 wallets in line with JoinMarket release v0.8.0.

ACKs for top commit:
  kristapsk:
    ACK 0cd8a73a26

Tree-SHA512: 00d4e843bbf12d93855f7741c1321b929278e28545fd02cce51dd6587b7f400fbaeae423f2568e23012271338ba4e1f1f0d8fab6b8fa93eedd5c6e90e48767e8
master
Kristaps Kaupe 5 years ago
parent
commit
bcfa7eb4ea
No known key found for this signature in database
GPG Key ID: D47B1B4232B55437
  1. 8
      scripts/genwallet.py

8
scripts/genwallet.py

@ -3,7 +3,7 @@
import sys
import os
from optparse import OptionParser
from jmclient import load_program_config, add_base_options, SegwitLegacyWallet, create_wallet, jm_single
from jmclient import load_program_config, add_base_options, SegwitWallet, SegwitLegacyWallet, create_wallet, jm_single
from jmbase.support import get_log, jmprint
log = get_log()
@ -23,7 +23,11 @@ def main():
load_program_config(config_path=options.datadir)
wallet_root_path = os.path.join(jm_single().datadir, "wallets")
wallet_name = os.path.join(wallet_root_path, args[0])
wallet = create_wallet(wallet_name, password, 4, SegwitLegacyWallet)
if jm_single().config.get("POLICY", "native") == "true":
walletclass = SegwitWallet
else:
walletclass = SegwitLegacyWallet
wallet = create_wallet(wallet_name, password, 4, walletclass)
jmprint("recovery_seed:{}"
.format(wallet.get_mnemonic_words()[0]), "important")
wallet.close()

Loading…
Cancel
Save