Commit Graph

510 Commits

Author SHA1 Message Date
Conner Fromknecht
7c4abd2418
lntest/node: change noencryptwallet to noseedbackup 2018-09-04 20:52:43 -07:00
Johan T. Halseth
fd7b1c2d5e
lntest/lnd test: make OpenChannel take channel param struct
Also add option for setting min_htlc value on channel creation.
2018-08-23 07:50:16 +02:00
Olaoluwa Osuntokun
147596047f
Merge pull request #1687 from halseth/disable-inactive-channels
Send ChannelUpdate with Disabled bit if channel inactive for 20 minutes
2018-08-17 18:04:19 -07:00
Johan T. Halseth
52941cec53
lntest: add SuspendNode 2018-08-17 23:24:13 +02:00
Wilmer Paulino
9ec6433863
lntest: extend OpenChannel to specify whether confirmed funds should be
used
2018-08-16 20:22:42 -07:00
Wilmer Paulino
130124bb79
lntest: add SendCoinsUnconfimed method
In this commit, we add a new method to the network harness that allows
us to send funds to another party without confirming the transaction.
This will be useful for testing funding channels with outputs that have
not been confirmed yet.
2018-08-16 20:22:42 -07:00
Wilmer Paulino
0a335bbea2
lntest: extract WaitForBalance into a method 2018-08-16 20:22:41 -07:00
Wilmer Paulino
9d2eeb6304
multi: update to latest fee estimation interface 2018-08-09 17:29:52 -07:00
Conner Fromknecht
cf2c371042
multi: fix linting errors 2018-08-02 18:20:50 -07:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Johan T. Halseth
ea2b706174
lntest/node: make sure finalizing file is over before stop 2018-07-22 11:20:23 +02:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Olaoluwa Osuntokun
dbf7e4525a
lntest: ensure we always cancel active streaming notifications 2018-07-06 12:21:54 -07:00
Olaoluwa Osuntokun
6830024faf
Merge pull request #1367 from halseth/waitpredicate-interval
lntest/harness: add pollIntervall to WaitPredicate
2018-06-13 19:17:30 -07:00
Olaoluwa Osuntokun
0d607f675f
Merge pull request #1344 from halseth/lndtest-defer-shutdown
integration tests: shut down nodes using defer
2018-06-13 15:57:17 -07:00
Johan T. Halseth
0316523bb5
lntest/harness: add pollIntervall to WaitPredicate
This commit adds a poll 20 ms interval to WaitPredicate, similar to what
is done for WaitInvariant. This makes the predicate not being checked
super-rapidly, potentially filling the logs with useless info over the
wait predicate interval.
2018-06-11 15:58:30 +02:00
Olaoluwa Osuntokun
7f16e99a80
lntest: add new StopNode method 2018-06-10 23:02:21 -07:00
Johan T. Halseth
226b38fed7
lntest/node: add method Name to get a node's name 2018-06-10 10:07:00 +02:00
Wilmer Paulino
d543ff5811
lntest: wait until channel is active within AssertChannelExists
In this commit, we fix a race condition where at times we open a channel
between two parties and immediately try to send payments over it. At
times this would fail due to the channel link not being fully registered
in the HTLC switch.
2018-05-24 22:56:48 -04:00
Conner Fromknecht
6fa7b2f8f7
lntest/node: execute lnd-debug binary 2018-05-02 00:18:51 -07: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
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
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
Johan T. Halseth
3347431923
lntest/harness: handle predicate error 2018-04-25 09:37:21 +02:00
practicalswift
663c396235 multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
Johan T. Halseth
25d56eda6f
lntest: timeout if process not exited in 1 minute 2018-04-13 11:33:08 +02:00
Olaoluwa Osuntokun
29c9d78c63
Merge pull request #965 from cfromknecht/makefile-fix-and-timeout
Switch to Makefile Build System
2018-03-31 16:09:59 -07:00
Conner Fromknecht
c1389a5388
lntest: execute locally compiled binary 2018-03-31 01:59:01 -07:00
Conner Fromknecht
0449c0d50b
lntest/node: advertise external IP in itests 2018-03-31 00:51:13 -07:00
Conner Fromknecht
0d8f4f4be4
lntest/harness: harden ConnectEnsure
Alters the behavior of ConnectEnsure to initiate a connection
attempt in both directions. Additionally, the wait predicate only
returns true after cross checking both peer lists.
2018-03-31 00:51:12 -07:00
Olaoluwa Osuntokun
4a3980353d
lntest: update test node arguments to account for new invoice.macaroon 2018-03-21 15:46:51 -07:00
Wilmer Paulino
900cd43768
multi: change to lnrpc.Channel type due to proto update 2018-03-19 11:19:06 -04:00
Conner Fromknecht
6a432c4be2
lntest: adds EnsureConnected helper method 2018-03-14 02:23:34 -07:00
Conner Fromknecht
82c1e9af92
lntest/harness: adds WaitInvariant helper method
This commits adds a complement to the existing WaitPredicate
helper function, ensuring that a boolean statement remains
true for the duration of the provided timeout. This expands
our ability to do simple sanity checks where the wait-until
semantics of WaitPredicate may not be as-well suited.
2018-03-14 02:23:34 -07:00
Conner Fromknecht
4bff32232c
lntest/node: adds SetExtraArgs to change node behavior after restart 2018-03-09 21:18:16 -08:00
Conner Fromknecht
90dec0ad6a
lntest/node: expose pprof port by default for itests 2018-03-09 21:18:16 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Conner Fromknecht
db7d902bbb lntest: move default channeldb path 2018-01-31 17:37:08 -08:00
Alex
21c29c33d7 multi: upgrade macaroons to v2, replace per-method auth with interceptors
This commit reworks the macaroon authentication framework to use the
v2 macaroon format and bakery API. It also replaces the code in each
RPC method which calls the macaroon verifier with interceptors which
call the macaroon verifier instead. In addition, the operation
permissions are reworked to fit the new format of "allow" commands
(specifically, entity/operation permissions instead of method
permissions).
2018-01-31 17:14:49 -08:00
Wilmer Paulino
f674e10a2b
lnd+cmd/lncli: handle ChannelPoint funding txid proto update
Since a ChannelPoint's funding txid can now be get/set as raw bytes or
a string, we first need to check what type it's currently set to before
accessing it.
2018-01-27 22:00:01 -05:00
Matt Drollette
86133e559b config: add peer, rpc, and rest listener options
This commit removes the `peerport` and `rpcport` config options and
adds `listen`, `rpclisten`, and `restlisten` options to allow setting
one or multiple interfaces to listen on for incoming connections.

It also adds a `nolisten` option to allow disabling the listener for
incoming peer connections.
2018-01-21 17:35:03 -08:00
Alex
9a02884d0b main/lntest: factor out node config options, add options for bitcoind
This commit factors out the btcd and ltcd options into their own sections
similar to neutrino, and adds a bitcoind section as well. Now, you specify
node options similarly to:

--ltcd.rpchost=...
or
--btcd.rpcuser=...
or
--bitcoind.zmqpath=...

For Bitcoin, you specify an alternate back-end to btcd as follows:

--bitcoin.node=bitcoind
or
--bitcoin.node=neutrino

You can also specify the default option:
--bitcoin.node=btcd

For Litecoin, only `btcd` mode is valid, and corresponds to the `ltcd`
section. For example:

--litecoin.node=btcd
--ltcd.rpchost=...

The new code also attempts to read the correct options and auth info
from bitcoin.conf just as it does from btcd.conf/ltcd.conf.
2018-01-15 13:59:34 -08:00
Johan T. Halseth
53b0ee3765
lntest/node: use --bitcoin.defaultchanconfs=1 and --bitcoin.defaultremotedelay=4 2018-01-12 22:57:00 +01:00
Johan T. Halseth
87dee4b15a
lntest: add AddToLog method for node
This commit adds a new method, AddToLog, that can
be used to add strings to a test node's log file.
2018-01-09 12:58:13 +01:00
Johan T. Halseth
a5f7c4872b lntest/harness: let OpenChannel take 'private' parameter 2018-01-06 17:21:49 -08:00
Olaoluwa Osuntokun
b56dcc988b
lntest: re-write loop in ConnectNodes to use WaitPredicate 2017-12-21 11:44:20 +01:00
Olaoluwa Osuntokun
6992822865
lntest: CloseChannel will wait for both nodes to show chan as active if not force
In this commit, we modify the CloseChannel to wait for both nodes to
detect that channel as being active before we attempt to close it. This
should serve to reduce many of the flakes that we’ve been seeing on
travis which were caused by node A detecting the channel as active, but
node B not, leading to a test flake under certain timing conditions.
The new function uses the recently added WaitPredicate method.
2017-12-21 11:43:17 +01:00
Olaoluwa Osuntokun
c3f84b1a47
lntest: re-write AssertChannelExists to use WaitPredicate internally
Recent changes to the funding manger’s state machine have resulted in
some additional database calls during the funding process. This has
slowed down the tests by a few ms here and there. Recent integration
test runs have begun to fail due to AssertChannelExists returning an
error as the channel hasn’t fully propagated yet. In order to remedy
this, we’ll now use WaitPredicate to poll repeatedly to ensure. This
should serve to reduce flakes encountered within the integration tests.
2017-12-21 11:35:29 +01:00
Olaoluwa Osuntokun
72147fe1e5
lntest: add new WaitPredicate helper function 2017-12-21 11:33:34 +01:00
Olaoluwa Osuntokun
2154ec130f
lntest: add new LookUpNodeByPub method to lookup active nodes by pubkey
In this commit, we add a new helper function to the NetworkHarness
struct. This helper function serves to allow test authors to look up
pointer to an active node based on its current public key.

Each time a new node is started, its public key will be re-registered
within the global nodesByPub map.
2017-12-21 11:33:04 +01:00
Matt Drollette
adf0d98194 multi: fix several typos in godoc comments 2017-12-17 18:40:05 -08:00
Johan T. Halseth
d7072c4f8f lntest/harness: set Private=false in OpenChannel 2017-12-17 18:35:34 -08:00
Jim Posen
84d7c7ee2c lntest: Refactor set up calls to NetworkHarness. 2017-12-14 20:06:23 -08:00
Jim Posen
02177a3f1c lntest: Improve HarnessNode stop logic and remove restart(). 2017-12-14 20:06:23 -08:00
Jim Posen
19ed1fb8db lntest: Add ShutdownNode method to harness.
This is preferable to calling Shutdown on the node directly so that
the harness manages the entire lifecycle of an lnd process.
2017-12-14 20:06:23 -08:00
Jim Posen
77d5f21b54 lntest: Add doc.go with package documentation. 2017-12-14 20:06:23 -08:00
Jim Posen
43e501feb9 lntest: Rename structs with proper visibility so lnd_test runs. 2017-12-14 20:06:23 -08:00
Jim Posen
3cb0705b8e lntest: Break lntest dependence on config in the main package.
This creates a new nodeConfig struct for the node in the lntest
package in order to decouple lntest from the main package.
2017-12-14 20:06:23 -08:00
Jim Posen
fd4af6da8e lntest: MOVEONLY networktest.go -> lntest package. 2017-12-14 20:06:23 -08:00