From d7a2b6b5a8e890de516c2940b666f5329dd70ce8 Mon Sep 17 00:00:00 2001 From: AdamISZ Date: Sat, 15 Dec 2018 14:29:30 +0100 Subject: [PATCH] regtest: fix wallet load in Qt --- docs/TESTING.md | 5 +++++ scripts/joinmarket-qt.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/TESTING.md b/docs/TESTING.md index 488f3d3..0a35a39 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -60,3 +60,8 @@ a 20% chance of *each* yg bot rejecting the auth message and the tx message (bot 20%). If you are running tumbler in adversarial conditions like that, consider changing things like the taker_utxo_retries or adding external commitments with the add-utxo tool so external commitments usage can be tested. + +### Testing Joinmarket-Qt with regtest + +You can follow the process above using `test/ygrunner.py` to set up the environment, and then just run `python joinmarket-qt.py` from within the `scripts` directory. +Note that you can load a random/empty wallet with a 32 char hex string, or more usefully, use the provided wallet with coins in it, as described above. The 'generate' and 'recover' functions will not work on regtest for now, however; they can currently only be tested on mainnet. \ No newline at end of file diff --git a/scripts/joinmarket-qt.py b/scripts/joinmarket-qt.py index dbd5d72..7b64d31 100644 --- a/scripts/joinmarket-qt.py +++ b/scripts/joinmarket-qt.py @@ -1382,7 +1382,7 @@ class JMMainWindow(QMainWindow): wallet_path = get_wallet_path(str(firstarg), None) try: self.wallet = open_test_wallet_maybe(wallet_path, str(firstarg), - None, ask_for_password=False, password=pwd.encode('utf-8'), + None, ask_for_password=False, password=pwd.encode('utf-8') if pwd else None, gap_limit=jm_single().config.getint("GUI", "gaplimit")) except Exception as e: JMQtMessageBox(self, @@ -1452,7 +1452,7 @@ class JMMainWindow(QMainWindow): def getTestnetSeed(self): text, ok = QInputDialog.getText( - self, 'Testnet seed', 'Enter a string as seed (can be anything):') + self, 'Testnet seed', 'Enter a 32 char hex string as seed:') if not ok or not text: JMQtMessageBox(self, "No seed entered, aborting",