Commit Graph

5373 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
a4b2765f83
Merge pull request #1165 from guggero/lncli-categories
lncli: group commands into categories
2018-05-03 15:20:50 -07:00
Oliver Gugger
80852601db
lncli: group startup commands, make full sentences 2018-05-03 11:49:09 +03:00
Conner Fromknecht
42a9a78180
htlcswitch/link: trim fix 2018-05-02 01:12:18 -07:00
Conner Fromknecht
ed4f77871a
htlcswitch/circuit_map: trim using NextLocalHtlcIndex 2018-05-02 01:12:17 -07:00
Conner Fromknecht
cae1d468e7
lnwallet/channel: expose NextLocalHtlcIndex 2018-05-02 01:12:17 -07:00
Conner Fromknecht
1b6101b0c0
channeldb/channel: add NextLocalHtlcIndex 2018-05-02 01:12:17 -07:00
Conner Fromknecht
308ad1caf6
htlcswitch/link_test: add link trimming tests 2018-05-02 01:12:17 -07:00
Jim Posen
56e65339e0 multi: Complete upgrade to new sphinx package interface. 2018-05-02 00:22:25 -07:00
Jim Posen
5d0d7a8511 htlcswitch: Move DecayedLog definition from sphinx package.
This moves over the implementation deleted in
https://github.com/lightningnetwork/lightning-onion/pull/22 to
structure package dependencies better.
2018-05-02 00:22:24 -07:00
Jim Posen
58c422beb5 dep: Upgrade version of lightning-onion. 2018-05-02 00:21:19 -07:00
Conner Fromknecht
9c178f3d7f
htlcswitch/link_test: use hodl ExitSettle instead of HodlHTLC 2018-05-02 00:21:09 -07:00
Conner Fromknecht
57245b5784
lnd_test: convert hodlhtlc -> hodl.exit_settle 2018-05-02 00:21:08 -07:00
Conner Fromknecht
6fa7b2f8f7
lntest/node: execute lnd-debug binary 2018-05-02 00:18:51 -07:00
Conner Fromknecht
701d37725c
peer: extract hodl mask, remove htlchodl mode 2018-05-02 00:18:51 -07:00
Conner Fromknecht
ab607a7ec6
config: hodl config 2018-05-02 00:18:51 -07:00
Conner Fromknecht
a36e1e6278
htlcswitch/link: adds HodlFlag breakpoints
This commit inserts an initial set of HodlFlags into
their correct places within the switch. In lieu of the
existing HtlcHodl mode, it is been replaced with a
configurable HodlMask, which is a bitvector representing
the desired breakpoints. This will allow for fine grained
testing of the switch's internals, since we can create
arbitrary delays inside a otherwise asynchronous system.
2018-05-02 00:18:51 -07:00
Conner Fromknecht
da53b35c73
make/testing_flags: compiles tests with debug flag 2018-05-02 00:18:51 -07:00
Conner Fromknecht
ffd240e0ee
Makefile: build debug binaries with build directive 2018-05-02 00:18:50 -07:00
Conner Fromknecht
137ec37450
htlcswitch/hodl_mask_test: tests HodlMask active flags 2018-05-02 00:18:50 -07:00
Conner Fromknecht
8f786bb860
htlcswitch/hodl/mask_debug: enable Mask w/ debug flag 2018-05-02 00:18:50 -07:00
Conner Fromknecht
cd43285993
htlcswitch/hodl/mask_production: disables Mask w/o debug flag 2018-05-02 00:18:50 -07:00
Conner Fromknecht
941bdcafad
htlcswitch/hodl/flags: adds flags signifying switch breakpoints 2018-05-02 00:18:50 -07:00
Conner Fromknecht
e677b1e9c4
htlcswitch/hodl/config: adds CLI bindings for hodl flags 2018-05-02 00:18:49 -07:00
Johan T. Halseth
690992043b
breacharbiter_test: add double handoff event 2018-05-02 08:43:32 +02:00
Johan T. Halseth
e9eab3f79f
server: reliably hand off breach from the ChainArbitrator to the breachArb
This commit make the server populate the ChainArbitrator's
ContractBreach method, by a method that will reliably handoff the breach
event ot the breachArbiter. The server will now forward the breach event
to the breachArbiter, and only let the closure return a non-nil error
when the breachArbiter ACKs this event.
2018-05-02 08:43:32 +02:00
Johan T. Halseth
08f1a3689d
peer: don't pass bool to SubscribeChannelEvents 2018-05-02 08:43:32 +02:00
Johan T. Halseth
f06797ab00
contractcourt/chain_arbitrator: make breachArbiter handoff a function closure
This commit adds the new function closure option ContractBreach to the
ChainArbitrator config, a closure that is again used by the ChainWatcher
to reliably handoff a breach event to the breachArbiter.
2018-05-02 08:43:31 +02:00
Johan T. Halseth
3fdc04dff0
contractcourt/chain_watcher: make breachArbiter handoff a function closure
This commit changes how the ChainWatcher notifies the breachArbiter
about a channel breach. Instead of assuming the breachArbiter is among
the clients subscibing to channel events, it will call a new method
contractBreach(), and assume the breachArbiter has reliably gotten the
breach info when this method returns with a non-nil error.

Since the breachArbiter was the only sybsystem having a sync chain
subsciption, we also remove the (now) unused syncDispatch option.
2018-05-02 08:43:31 +02:00
Johan T. Halseth
a6f0dd72ac
contractcourt/chain_arbitrator: use chainWatcherConfig 2018-05-02 08:43:31 +02:00
Johan T. Halseth
0697510884
contractcourt/chain_watcher: create chainWatcherConfig 2018-05-02 08:43:31 +02:00
Johan T. Halseth
7c945b42fe
fundingmanager_test: remove ArbiterChan 2018-05-02 08:43:31 +02:00
Johan T. Halseth
cdf60b5f9d
lnd: remove ArbiterChan 2018-05-02 08:43:31 +02:00
Johan T. Halseth
c3f0e608ec
fundingmanager: remove ArbiterChan 2018-05-02 08:43:31 +02:00
Johan T. Halseth
409ab08c36
rpcserver: remove send to settledContracts 2018-05-02 08:43:30 +02:00
Johan T. Halseth
55ac8735b6
breacharbiter_test: use ContractBreaches channel 2018-05-02 08:43:30 +02:00
Johan T. Halseth
b9970aec47
breacharbiter: receive breaches to ACK on separate channel
This commit changes how the breachArbiter gets notified about channel
breaches. Previously it would need to SubscribeToChannelEvents to get
get notified if any breach happened, now we send all seen breaches on a
new channel ContractBreaches.

By having the breachArbiter subscribe to channel events, we risked
events getting lost when we were either starting up or shutting down,
since events could happen before we had been able to subscribe, or right
after we had cancelled our subscription.

Now it is the server's responsibility to reliably forward events from
the ChainArbitrator to the breachArbiter, and forward the ACK the
breachArbiter responds with. This makes sure that the messages aren't
lost in the event of starting up or shutting down, since the connection
between the subsystems now are static.

A result of this change is that the internals of the breachArbiter can
be simplified significantly, as we will get all channel breaches
forwarded on one channel. This lets us get rid of the observer
goroutines, and we spin up goroutines handling the channel breaches only
when they happen.
2018-05-02 08:43:30 +02:00
Johan T. Halseth
79341fc63e
contractcourt/chain_watcher: move log message
This move the log message "channel marked pending-closed" to the point
where the channel actually has been marked pending closed, instead of
before the database transaction has been done.
2018-05-02 08:43:30 +02:00
Johan T. Halseth
7e397067f6
contractcourt/chainwatcher: remove close observer for loop
This commit removes the for loop in the closeObserver, as it wasn't
serving any purpose. After receiving a spend notification we would
return, breaking out of the loop. When getting a quit signal we would
also return, making the loop only do one iteration in any case.
2018-05-02 08:43:30 +02:00
Oliver Gugger
ad106bcefd
lncli: group commands into categories 2018-05-02 08:55:55 +03:00
Olaoluwa Osuntokun
097fd50747
Merge pull request #1140 from guggero/integrationtest-logfile-upload
Integration tests: upload logs from TravisCI to file.io as well
2018-05-01 21:08:14 -07:00
Olaoluwa Osuntokun
ef96c97786
Merge pull request #1139 from guggero/integrationtest-logfiles
Integration tests: give nodes a name and print that name in log file name
2018-05-01 21:05:42 -07:00
valentinewallace
8fcd6b56cb chainntnfs: expand test for mempool spend notifications
Make sure new clients get notified about txs that are already in the mempool.

Fixes #1074.
2018-05-01 19:09:56 -07:00
Olaoluwa Osuntokun
c7c25445eb
lnwallet: add new test to ensure channel is able to update fees in both directions
Closes #1145.
2018-05-01 17:35:42 -07:00
Oliver Gugger
b75429c6fe test: upload integration test logs from TravisCI to file.io 2018-05-01 13:16:21 +03:00
Oliver Gugger
cbd981c236 lnd_test: make sure node ID is correctly initialized in log file name 2018-04-30 11:59:34 +03:00
Vegard Engen
d7a254328e Take into account that the new fee will not come in addition to old fee when updating commit fee 2018-04-29 22:42:20 +00:00
Oliver Gugger
578f1d9332 lnd_test: give nodes a name and print that name in log file name 2018-04-28 17:46:50 +03:00
Olaoluwa Osuntokun
09c9979831
Merge pull request #1138 from halseth/integration-test-remove-block-flake
Integration tests: remove racy block generation
2018-04-27 13:19:39 -07:00
Johan T. Halseth
23f67ef009
lnd_test: remove racy block generation
This commit removes the mining of a block within the integration tests,
that would lead to a flake during runs. The reason was that the sweeoing
transaction was actually broadcast already at this point, and this block
was mined with the assumption that it wasn't. However, test would pass
more often than not because the UTXO nursery would be working on
graduating new heights, whcih is a bit slow, so in most cases the block
would be mined before it had broadcast the sweeping transaction.

By removing this block we ensure that the sweeping transaction will be
found for sure in the waitForTxInMempool call below.
2018-04-27 10:01:05 +02:00
Olaoluwa Osuntokun
4ab2bba5c7
Merge pull request #1005 from cfromknecht/wallet-recovery
Wallet Recovery
2018-04-26 20:21:03 -07:00