to be selected by a taker's sweeping coinjoin.
This is done by approximating the cjamount ceiling and filtering to one offer per
maker before the actual selection algorithm runs.
If a user doing sendpayment decided to reject the offered fees,
before this commit this resulted in a crash because the call
to Taker.on_finished_callback was passed with fromtx=True for
a single line schedule, which attempts to restart. fromtx should
have been set to False when it is the last item in the schedule
(in this case, both first and last). This incorrect argument
existed before restart-with-subset but was then harmless, now
it attempts to recover with no Taker.nonrespondants and crashes.
Fix is simply to provide the right second argument (False) to
the function call.
If N makers are chosen and M fail to respond with sig,
this alteration to taker code allows restart of
entire transaction with that specific subset of makers (N-M)
that originally responded honestly.
This fixes the non-deterministic failures of the test_schedule tests.
It does so by addressing the underlying issue, which is described in
be made configurable in future, but assessed as not worth it here.
It will end up showing very small and actually wrong numbers like
5.38939837311e-11 % or even -1.48880395563e-11 % if it's newly funded
wallet with no coinjoins happened yet.
Prior to this commit, if a user chose to reject offers, or the offers
choosing process failed for another reason, the on_finished_callback
of the Taker was called, as well as the return value passed to the
client protocol being "False", and both execution paths called
reactor.stop(), resulting in an Exception in twisted (a reactor can
only be stopped once). This commit fixes that by only stopping the
reactor in the client protocol code (and only in cases of 1
sendpayment; for multiple tx runs, it waits and restarts).
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.
This case can happen if you sweep to a destination under the control
of your Core wallet (although it's rare). This is not actually a problem,
since that address neither was nor will be Joinmarket's. Hence show a
warning but continue. Also add a comment to BitcoinCoreInterface.im-
port_addresses, to note that it must *only* be used for initial sync,
since it has a risk of shutting down the program.
This fails (sys.exit) when importaddress throws the error corresponding to
Core wallet already owning the key corresponding to an address, and gives
brief advice how the error can be fixed.
It is not considered safe to simply ignore this error in case address reuse
or coins being sent to an address the user doesn't control, occurs.
Signatures sent a second time now are correctly ignored, rather than prompting
a removal for the utxo entry which fails since it's already been removed.
Also corrects the case where a junk signature can trigger a crash in verify_tx_input,
if its script deserialization results in non-string entries (integer or None).
Test cases in test_taker updated to include these error cases, now passing.
Note that this does not fix *usage* of the coins corresponding
to the imported key, which is currently not working. A further fix
is needed for coin selection and display.
confirmation as per TIMEOUT section in config.
Mark wallet as synced after sync_unspent in Core
interface (to match Electrum interface, and wait for
this update before modifying orders).
To correspond, allow fast sync in test setup in several tests.
Disallow sync_unspent in syncing wallet full mode if sync_addresses fails.
This prevents the wallet erroneously being marked as synced in full mode.
This change happened as a result of the new electrum wallet sync; because
this is asynchronous, the call to sync_unspent in the client protocol does
not block, thus must be flagged when complete, this is done with
bci.wallet_synced set to True at end of sync_unspent. But this leads
to the wallet as always being marked synced using full sync_mode if we
call both functions unconditionally.
These wallet sync conditions have become unwieldy; a refactor is in order.
Some small extra documentation in docs/TODO.md.