In commit 22467f4 a bug was introduced whereby detailed
sync was used instead of fast sync, but with only one
iteration, in Joinmarket-Qt, in certain circumstances,
leading to incorrect wallet reporting/display. This commit
reverts that change (except for function name change).
There may still be edge cases for large wallets doing
recovery in Qt but this will be dealt with later.
Fixes#362. Prior to this commit, if tumbler was invoked with
the --restart flag, it waited for the presence of the 0 index
output of the last seen tumbler transaction in the utxo set,
which was an unreliable indicator as that output could have,
in the meantime, been spent.
After this commit, we utilise the fact that the transaction
must be an in-wallet transaction, and use the rpc gettransaction
to check whether it has 1 or more confirmations, instead, which
should always work whether any outputs are spent or not.
Previous to this commit, selecting a new schedule file would
not "correctly" detect that an unfinished tumble run was selected
(note that this "detection" is currently just checking the
name of the file, so it may have to be changed in future). The
reason for the failure to detect is that in the PyQt5 version,
the filenames are returned as a tuple, and so the str() conversion
did not match.
Wallet persists utxo metadata; currently only
contains a field 'disabled' indexed by utxo.
User can switch this on or off (enabled) via
wallet-tool 'freeze' method.
Disabled utxos will not be used in coin
selection in any transaction.
Wallet still displays all utxo balances in
display method (and in GUI).
Add tests of disabling to test_utxomanager
Add Coins tab to Qt, with freeze/unfreeze feature.
Coins tab shows updated utxo info txid:n, amt, address and
enabled/disabled, which can be toggled from right click menu.
Instead of displaying blank tree of wallet mixdepths / addresses.
Also renamed self.history to self.walletTree, for the name to be less
confusing, as there is also TxHistoryTab which is unrelated.
Before this change with wallet-tool.py you would get "ValueError:
invalid padding byte" and "jmclient.storage.StoragePasswordError: Wrong
password." exceptions, joinmarket-qt would fail silently.
Prior to this commit, if a user chose cancel while selecting a
filename for a new wallet in Qt, the wallet name was set to the
default `wallet.jmdat`, which could lead to a crash or overwrite.
This fixes that by ensuring that the wallet generation code
recognizes the cancel operation.
Previous to this commit, the jmbitcoin package was accessed via
a file in jmclient `btc.py` which was originally added as an
interface to allow the client to use a non-jmbitcoin package to
provide the implementation; while this idea is useful, the way
it was implemented was not, moreover it is not currently used
and contained duplicated code that was unmanaged. Also, the
original usage of this was only by the electrum plugin, which
has currently been abandoned. This simplifies the code and
avoids spurious error messages. Note that most of the changes
are a result of pulling the logging function directly from the
jmbase package instead of indirectly via this interface (which
was unnecessary and not connected with jmbitcoin).
As for maker, to use this feature set segwit = false
in the POLICY section of the config file.
This commit does *not* include support in the GUI.
Additionally, minor fixes to utility scripts for non-sw wallets,
and updated add-utxo tool to support non-sw wallets.
Bugfixes to wallet_utils to support non-sw wallets
and signmessage.
Set wallet synced to True on code branch where wallet is empty, so sync completes.
Ensure wallet_synced is False at the start of new sync (otherwise Resync in Qt fails).
wif compressed version byte is the pubkey version byte,
not the address version byte (so x80 or xef).
This is updated in the scripts and the Qt code for
exporting or displaying.
sendtomany update:
script now works with segwit or non-segwit inputs
(segwit by default), still requiring a utxo and a
wif compressed privkey as input.
small clean up in electrum:
remove nonresponsive testnet server
remove unwanted print statement from fee estimate