1. In lnhtlc, sent_in_ctn and failed_in_ctn need to look at the
remote ctx, and they need to be called when we receive a revocation,
not when we send one.
2. In lnchannel, we use 3 lnworker callbacks:
- payment sent/payment failed (called when we receive a revocation)
- payment received (called when we send a revocation)
3. Make revoke_current_commitment return a single value.
The second value was only used in tests, there is no need
to bloat the code with that
Internally, we've been using an expiration of 0 to mean "never expires".
For LN invoices, BOLT-11 does not specify what an expiration of 0 means.
Other clients seem to treat it as "0 seconds" (i.e. already expired).
This means there is no way to create a BOLT-11 invoice that "never" expires.
For LN invoices,
- we now treat an expiration of 0, , as "0 seconds",
- when creating an invoice, if the user selected never, we will put 100 years as expiration
Old estimate was heavily biased towards simply minimising CLTV sum.
(fees had a too low weight; typically they were ~noise)
Now also take payment_amount into account.
There are some legitimate use-cases for changing the gap limit,
so just as it has already been possible to do in the GUI (using the console only! don't expose this to mere mortals.),
now CLI/RPC users have this exposed too.
The "changegaplimit" command will always raise unless invoked with the --iknowwhatimdoing option.
closes#5882
e.g.:
$ curl --data-binary '{"id":"curltext","jsonrpc":"2.0","method":"changegaplimit","params":{"new_limit": 30, "iknowwhatimdoing": true, "wallet":"~/.electrum/testnet/wallets/test_segwit_2"}}' http://user:password@127.0.0.1:7777
$ ./run_electrum --testnet changegaplimit 30 --iknowwhatimdoing -w ~/.electrum/testnet/wallets/test_segwit_2
For a watch-only wallet, previously a superfluous dummy "Tap to show"
box was shown.
For a has no seed stored (but not watch-only) wallet (e.g. bip39/xprv/imported_privkeys),
the "show seed" option was there and it raised an uncaught exception.