Skip to content

Commit

Permalink
regtest: fix wallet load in Qt
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamISZ committed Dec 15, 2018
1 parent 9fe7fd8 commit d7a2b6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions scripts/joinmarket-qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ def loadWalletFromBlockchain(self, firstarg=None, pwd=None, restart_cb=None):
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,
Expand Down Expand Up @@ -1452,7 +1452,7 @@ def generateWallet(self):

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",
Expand Down

0 comments on commit d7a2b6b

Please sign in to comment.