Commit Graph

3950 Commits

Author SHA1 Message Date
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
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
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
Conner Fromknecht
1ae3d4f118 dep: update btcwallet w/ wallet recovery 2018-04-26 16:34:21 -07:00
Conner Fromknecht
5049d3956b lnd_test: adds wallet recovery test 2018-04-26 16:34:21 -07:00
Conner Fromknecht
c977ebb8bd lntest/node: add ability to unlock/init HarnessNode 2018-04-26 16:03:28 -07:00
Conner Fromknecht
329793d06b lntest/harness: add NewNodeWithSeed and RestoreNodeWithSeed 2018-04-26 16:03:28 -07:00
Conner Fromknecht
92a2ba163e cmd/lncli/commands: ask for recovery window after restore seed 2018-04-26 16:03:28 -07:00
Conner Fromknecht
a2fdd8593d lnwallet/interfaace_test: init neutrino with chain params 2018-04-26 16:03:28 -07:00
Conner Fromknecht
06a53aa5cc lnwallet/btcwallet/config: add recovery window and bday 2018-04-26 16:03:28 -07:00
Conner Fromknecht
ae604061bf lnwallet/btcwallet/btcwallet: pass recovery window to CreateNewWallet 2018-04-26 16:03:27 -07:00
Conner Fromknecht
603228ce79 lnd: threads recovery window param from walletunlocker 2018-04-26 16:03:27 -07:00
Conner Fromknecht
b9df5e75f7 keychain/interface_test: init test wallet w/o recovery window 2018-04-26 16:03:27 -07:00
Conner Fromknecht
1972a795e5 chainregistry: initialize wallet w/ recovery window 2018-04-26 16:03:27 -07:00
Conner Fromknecht
0ae62c3720 lnrpc: add RecoveryWindow to InitWalletRequest 2018-04-26 16:03:27 -07:00
Conner Fromknecht
3cb87f377f walletunlocker/service_test: check recovery window is threaded 2018-04-26 16:03:09 -07:00
Conner Fromknecht
f8c0357770 walletunlocker: accept recovery window from InitWallet 2018-04-26 16:03:09 -07:00
Conner Fromknecht
c824af11a1 aezeed: expose BirthdayTime conversion from offset 2018-04-26 16:03:05 -07:00
Olaoluwa Osuntokun
c54a91f44d rpc: modify SignMessage+VerifyMessage to bind msg to LN context
In this commit, we modify the SignMessage+VerifyMessage slightly in
order to bind the message we're signing to our specific context. We do
this by pre-pending the ascii text "Lightning Signed Message:" to the
msg before we run it through dsha256. Adding this prefix binds the
message to our context in order to avoid accidentally signing a sighash
or the like.
2018-04-25 19:45:32 -07:00
Olaoluwa Osuntokun
86fd9e361e Merge pull request #1017 from halseth/contract-court-without-on-chain
Contract court acting on confirmed chain events
2018-04-25 17:13:24 -07:00
Richard Bondi
caf8139750 docs/grpc: correct javascript macaroon example
Creating and adding metadata in single line resulted in null `metadata`
2018-04-25 13:38:39 -07:00
Olaoluwa Osuntokun
c9eb077935 cmd/lncli: remove unused args for pendingchannels command
Fixes #1123.
2018-04-25 13:28:15 -07:00
Johan T. Halseth
4320421110 contractcourt/chain_watcher: don't delete syncDispatch clients on Cancel()
This commit makes clients subscribing to channel events that are marked
"sync dispatch" _not_ being deleted from the list of clients when they
call Cancel(). Instead a go routine will be launched that will send an
error on every read of the ProcessACK channel.

This fixes a race in handing off the breach info while lnd was shutting
down. The breach arbiter could end up being shut down (and calling
Cancel()) before while the ChainWatcher was in the process of
dispatching a breach. Since the breach arbiter no longer was among the
registered clients at this point, the ChainWatcher would assume the
breach was handed off successfully, and mark the channel as pending
closed. When lnd now was restarted, the breach arbiter would not know
about the breach, and the ChainWatcher wouldn't attempt to re-dispatch,
as it was already marked as pending closed.
2018-04-25 09:37:26 +02:00
Johan T. Halseth
8d5a33e349 lnd_test: modify tests to work with on-chain spend registrations
This commit modifies the integration tests to work with the recent
 changes to the ChannelArbitrator, where it will only act on commitments
 that has been confirmed. Main changes involving when to look for
 transactions in the mempool and in blocks, and using the new RPC for
 getting channels in the "waiting close" phase when they are waiting for
 the commitment to confirm.
2018-04-25 09:37:26 +02:00
Johan T. Halseth
028d1b7e26 lnd_test: add more relevant info to error messages 2018-04-25 09:37:26 +02:00
Johan T. Halseth
ddf62bbeea contractcourt/channel_arbitrator: remove unused transationTrigger 2018-04-25 09:37:25 +02:00