This refactors YieldGeneratorBasic a bit. In particular, we move things
that custom algorithms will most likely want to change to separate
functions. That way, it is easy to define the behaviour of inputs
and outputs for the join without the need to duplicate the other, more
general logic of create_my_orders and oid_to_order.
This adds simple unit tests for the core functionality of
YieldGeneratorBasic in the new file jmclient/test/test_yieldgenerator.py.
The tests verify that offer creation, reannouncement of offers when a
change is made to the maxsize and translation of offers to orders works
as it should.
remove unused import
This reverts commit 4b4f8c97f4.
Due to a flawed assumption where sometimes importing addresses does
take a significant amount of time. For example on machines with HDD
importing 1-2 addresses can last a second or two, and importing 60
addresses lasts about 30 seconds. The commit makes running a maker
impossible on such a machine.
Prior to this commit, if an invalid destination address
was entered on the command line for the tumbler script,
the invalidity would cause a crash at the time a transaction
was built with this destination (during the run).
After this commit, all destination addresses entered on
startup are checked immediately and the program quits with
this information if a specific address is invalid.
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.
c9bf1c6 Update documentation: Replace links to instructions in original Wiki with updated and corrected instructions within USAGE.md. Add YIELDGENERATOR.md to docs/ with updated and corrected instructions from original wiki. (AdamISZ)
Replace links to instructions in original Wiki with updated
and corrected instructions within USAGE.md.
Add YIELDGENERATOR.md to docs/ with updated and corrected
instructions from original wiki.
d62a300 Fix sweeps with N=0 counterparties, which otherwise fails because the amount was changed from 0 too early (AlexCato)
b656f85 Sendpayment/Tumbler: fix division by 0 error on sweeps (AlexCato)
af11116 Estimate tx fees for sendpayment or full tumbler run and warn the user if the tx fee estimation exceeds 5% of the funds to be coinjoined/tumbled. (AlexCato)
4b4f8c9 Fix bug in detailed wallet sync relating to gap addrs. (AdamISZ)
6c15bd7 Make address imports with address requests in wallet Prior to this commit, there was duplicated code in maker and taker modules to import addresses, now all calls to the wallet for fresh addresses can optionally pass a blockchaininterface instance and if this is done, the new address will be imported to the BCI at the same time. (AdamISZ)
Prior to this commit, addresses imported on tx creation
were at the tip of the index only, but detailed sync
requires all address gap-forwards to be imported, else
it requires a restart.
The particular fix approach taken her is aggression
because import is cheap; we import wallet.gaplimit forwards
on all branches, taking advantage of the bci's function
_collect_addresses_gap, thus ensuring that unless the gap
limit changes, we will definitely not need a restart.
Fast sync did not suffer from this and is unchanged.
Prior to this commit, there was duplicated code in maker
and taker modules to import addresses, now all calls to
the wallet for fresh addresses can optionally pass a
blockchaininterface instance and if this is done, the
new address will be imported to the BCI at the same time.
Currently, only 'self' works until the other options for tx_broadcast are implemented. Update the docs accordingly, because there was someone wondering on IRC today why his transaction failed to broadcast; the reason was he changed this setting, which currently only works for 'self'.
If the other options are implemented (tagging #368 ), this documentation should be changed along with it.
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.