Browse Source

regtest: fix wallet load in Qt

master
AdamISZ 7 years ago
parent
commit
d7a2b6b5a8
No known key found for this signature in database
GPG Key ID: 141001A1AF77F20B
  1. 5
      docs/TESTING.md
  2. 4
      scripts/joinmarket-qt.py

5
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 20%). If you are running tumbler in adversarial conditions like that, consider
changing things like the taker_utxo_retries or adding external commitments with changing things like the taker_utxo_retries or adding external commitments with
the add-utxo tool so external commitments usage can be tested. 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
scripts/joinmarket-qt.py

@ -1382,7 +1382,7 @@ class JMMainWindow(QMainWindow):
wallet_path = get_wallet_path(str(firstarg), None) wallet_path = get_wallet_path(str(firstarg), None)
try: try:
self.wallet = open_test_wallet_maybe(wallet_path, str(firstarg), 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")) gap_limit=jm_single().config.getint("GUI", "gaplimit"))
except Exception as e: except Exception as e:
JMQtMessageBox(self, JMQtMessageBox(self,
@ -1452,7 +1452,7 @@ class JMMainWindow(QMainWindow):
def getTestnetSeed(self): def getTestnetSeed(self):
text, ok = QInputDialog.getText( 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: if not ok or not text:
JMQtMessageBox(self, JMQtMessageBox(self,
"No seed entered, aborting", "No seed entered, aborting",

Loading…
Cancel
Save