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).
Previously, if a bot reconnected and encountered a nick
collision, it would append '_' and connect, but counterparties
would ignore appended characters after NICK_MAX_ENCODED+2, and
so would send to the other nick. This happens in network
connection failure scenarios.
Strategy here is to simply insist on regaining the nick on that
message channel where it has been lost, retrying every 10s.
There is also a loud warning message printed.
Make RPC connection persistent to improve high throughput RPC
access where necessary; uses keep alive and recreates connection
when it drops.
Restrict listtransaction calls to the required account, plus only
looks back 100 txs (assuming concurrent txs less than this), thus
greatly reducing the number of gettransaction calls over RPC.
Fixes bug in choose_sweep_orders (was not filtering out non-sw
orders).
Removes tickchainthread from tests, so no longer any threads used
even in tests; replaces with reactor task loop.
Temporarily removes test_wallets and test_segwit from build tests,
since they used blocking which only worked in threaded tests; these
tests must be rebuilt.
Uses protocol.ReconnectingClientFactory as superclass,
which uses exponential backoff in retrying.
Also change on_welcome_trigger callback to reset the
status of message channels which have reconnected,
so that they become operable once reconnected.