Janus
1d4c113a35
lnhtlc: remove lookup_htlc, use heterogeneously typed lists
2019-08-20 09:03:10 +02:00
Janus
699368b0b7
lnhtlc: save settled htlc amounts separately
2019-08-20 09:03:10 +02:00
SomberNight
d44afd9633
fix tests
2019-08-20 09:03:10 +02:00
Janus
efc8d50570
move connection string decoding to lnworker, fix test_lnutil
2019-08-20 09:03:10 +02:00
Janus
50b3bc939c
avoid reading from queues concurrently in pay()
2019-08-20 09:03:10 +02:00
SomberNight
d29191b010
rename LNChanAnnVerifier
2019-08-20 09:03:10 +02:00
Janus
d5d9270d0c
lnhtlc: save logs and feeupdates
2019-08-20 09:03:10 +02:00
Janus
eca5545004
lnhtlc: don't throw away fee updates or htlcs
...
also add inject_fees debug command
2019-08-20 09:03:10 +02:00
Janus
02eca03486
lnhtlc: cleanup and save settled htlcs
2019-08-20 09:03:10 +02:00
Janus
6f5209ef85
lnhtlc: test that sent amount is received
2019-08-20 09:03:10 +02:00
Janus
261fefb6f3
lnwatcher rebased
2019-08-20 09:03:10 +02:00
SomberNight
0b0bc89083
fix tests
2019-08-20 09:03:10 +02:00
SomberNight
c02cc9bb3b
persist recent peers. implement dns seed bootstrapping.
...
dns seeds are currently disabled though, as they always seem to return mainnet nodes.
2019-08-20 09:03:10 +02:00
SomberNight
bc06ded4b9
persist nodes in channel_db on disk
2019-08-20 09:03:10 +02:00
SomberNight
5a05a92b3d
move bolt-04 onion stuff to its own module
2019-08-20 09:03:10 +02:00
Janus
9247da5203
ln: share more code with control path for failed htlc, verify ctx'es
2019-08-20 09:03:10 +02:00
Janus
3c06b3cee1
ln: use START_INDEX instead of 2**48-1
2019-08-20 09:03:10 +02:00
Janus
a841fa3602
ln: save htlc signatures
2019-08-20 09:03:10 +02:00
SomberNight
d0798c336f
channeldb: allow injecting trusted edges
2019-08-20 09:03:10 +02:00
SomberNight
a5b44d25b0
persist channel db on disk. verify channel gossip sigs.
2019-08-20 09:03:10 +02:00
Janus
9853cc6f31
ln: do not use mSAT accuracy for commitment fees
2019-08-20 09:03:10 +02:00
Janus
66e7b4d250
ln: fundee must commit to fee first
2019-08-20 09:03:10 +02:00
Janus
d740475e7a
move channel_state into HTLCStateMachine
2019-08-20 09:03:10 +02:00
Janus
35adc3231b
lightning: fixup after rebasing on restructured master
2019-08-20 09:03:10 +02:00
SomberNight
1c75d939d9
commands: change API of "make_seed" and "create" commands
...
instead of "segwit" boolean, take a "seed_type" optional arg
default seed_type to "segwit"
previously these commands created legacy seeds by defalt
2019-08-09 22:02:01 +02:00
Daniel Kraft
3f8661b069
Unit tests for Blockchain.verify_header.
...
The function Blockchain.verify_header was previously not covered by tests
at all. Even removing all the tests in it would still make the unit tests
pass. This change adds tests for this important (!) function.
2019-07-28 13:23:20 +02:00
SomberNight
aadde9be17
transaction: fix remove_signatures
...
closes #5491
2019-07-05 21:16:58 +02:00
SomberNight
cc9ad3ae90
wallet: fix restore_wallet_from_text edge case
...
closes #5490
2019-07-05 19:27:44 +02:00
SomberNight
94b721baa4
wallet: fix type error in _bump_fee_through_decreasing_outputs
...
fixes #5483
2019-07-04 17:23:34 +02:00
SomberNight
e0b1bbfc46
tests: new tests for bump_fee and rbf_batching
2019-06-20 22:42:50 +02:00
SomberNight
0c20fcb6b3
tests: fix existing bump_fee tests
2019-06-20 22:42:49 +02:00
SomberNight
d0a43662bd
wallet: make "increase fee" RBF logic smarter
...
There are now two internal strategies to bump the fee of a txn.
bump fee method 1: keep all inputs, keep all not is_mine outputs,
allow adding new inputs
bump fee method 2: keep all inputs, no new inputs are added,
allow decreasing and removing outputs (change is decreased first)
Method 2 is less "safe" as it might end up decreasing e.g. a payment to a merchant;
but e.g. if the user has sent "Max" previously, this is the only way to RBF.
We try method 1 first, and fail-over to method 2.
Previous versions always used method 2.
fixes #3652
2019-06-20 22:42:48 +02:00
SomberNight
e3c26d7c7a
json_db: fix remove_spent_outpoint
...
method should make sure prevout_n is str...
also wrote failing test
2019-06-15 03:51:11 +02:00
SomberNight
9e21b76c91
wallet: stricter validation in export_private_key
...
fixes #5422
2019-06-12 18:09:38 +02:00
SomberNight
53d189fc7a
storage: fix some madness about get_data_ref() and put() interacting badly
...
previously load_transactions() had to be called before upgrade();
now we reverse this order.
to reproduce/illustrate issue, before this commit:
try running convert_version_17 and convert_version_18
(e.g. see testcase test_upgrade_from_client_2_9_3_old_seeded_with_realistic_history)
and then in qt console:
>> wallet.storage.db.get_data_ref('spent_outpoints') == wallet.storage.db.spent_outpoints
False
>> wallet.storage.db.get_data_ref('verified_tx3') == wallet.storage.db.verified_tx
False
2019-06-06 19:49:06 +02:00
SomberNight
30ffb3d4dc
util: add function "chunks"
...
taken from ElectrumX
67111a3c4c/electrumx/lib/util.py (L149)
2019-05-26 04:10:32 +02:00
SomberNight
6ad24ea3b3
keystore/transactions: fix overflow of derivation path indices
...
fixes #5366
2019-05-21 02:14:22 +02:00
SomberNight
fd58a0cb20
json_db: enforce order of 'load_transactions' and 'upgrade'
...
fixes #5331
2019-05-13 19:21:26 +02:00
SomberNight
808239bbcc
wallet: fix deleting address from Imported_Wallet
...
closes #4481
2019-05-11 02:08:15 +02:00
SomberNight
07ec0d41d5
fix prev
...
unintentionally committed
2019-05-03 03:13:43 +02:00
SomberNight
fd5b1acdc8
commands: fix encrypt/decrypt
...
based on Electron-Cash/Electron-Cash@62aa08a0ff
2019-05-03 03:10:31 +02:00
SomberNight
7584cebbe3
bitcoin: stricter check on WIF for compressed pubkeys
...
fixes #5290
2019-04-25 14:35:16 +02:00
SomberNight
d4a2e9634f
bitcoin: disallow importing/sweeping segwit scripts with uncompressed pubkey
...
fixes #4638
2019-04-19 00:37:28 +02:00
SomberNight
bca6ad5241
verifier: fix logic bug. after reorg, some verifs were not undone
...
after a reorg, in a many fork/orphan chains scenario,
we would sometimes not undo SPV for enough blocks
functions in blockchain.py somewhat based on kyuupichan/bitcoinX@5126bd15ef
2019-03-26 21:01:43 +01:00
SomberNight
9a71120090
blockchain: fix bug when swapping chain with parent
...
chain might become the parent of some of its former siblings
2019-03-26 20:55:27 +01:00
SomberNight
eb04551f9a
accept base43-encoded tx in Qt "Load transaction"
...
When encoding transactions as QR codes, we encode the tx bytes as base43
first. This makes it easier to load a transaction if the user manually
decodes the QR code.
2019-03-05 17:27:53 +01:00
SomberNight
94c4cb44d7
fix storage upgrade tests: "fixture 'func' not found"
2019-03-01 21:02:10 +01:00
SomberNight
9ecb504739
storage: fix convert_version_17 and add new test case
...
follow-up 121b8048b0
2019-03-01 19:46:23 +01:00
SomberNight
f85b8f349d
wallet: fix bug in restore_wallet_from_text, and write tests
2019-02-28 20:26:29 +01:00
ThomasV
d74f0c0947
storage_db: fix tests, add modified flag to db class
2019-02-28 12:09:36 +01:00