Commit Graph

7273 Commits

Author SHA1 Message Date
Johan T. Halseth
aceda7fbcb
travis: enable caches
This commit sets the GOCACHE environment variable, and enables caching
on travis.

GOCACHE will tell the compiler (only go 1.10+) where to store build and
test artifacts. Caching this directory will significantly speed up
succeeding builds and test runs.

We also cache vendor/ as this will speed up the call to 'make dep'.

A few dependencies in the GOPATH are cached, as calls to 'go get' for
these will be sped up. Note that we don't cache the lnd directory, as it
will conflict with the changes in the PR being built.
2018-11-16 11:08:54 +01:00
Johan T. Halseth
b4aeb83dbb
travis: split up into 3 builds
This commit distributes the CI tests into 3 independend builds, by
splitting the integration test run and unit test coverage.

To better handle the extra cases, we define a build matrix with the
three build types (RACE and LINT, ITEST, COVER).
2018-11-16 11:08:16 +01:00
Johan T. Halseth
d3c9be1f32
travis: only run on latest go 2018-11-16 11:07:03 +01:00
Johan T. Halseth
b64d55cdbf
make: remove make travis 2018-11-16 11:04:51 +01:00
Johan T. Halseth
9e950b4739
travis: execute make travis step by step
Instead of calling 'make travis' directly, we call each step. This lets us
better track how much time is spent on each.

Also note that we execute 'itest-only' instead of 'itest', and instead
execute the dependencies (btcd, build) manually first.

We explicitly set the ITEST environment variable, for readability, and
define a new COVER. This is currently true when ITEST=true to keep the
existing build configuration, but will later be configured to be
independent.
2018-11-16 11:04:51 +01:00
Johan T. Halseth
b98ab723ee
travis: remove unnecessary export PATH
This is done automatically by travis as part of the go setup.
2018-11-16 11:04:51 +01:00
Johan T. Halseth
23c858576f
make: define itest-only
'itest-only' can be used to only run integration tests, not build any of
the dependencies. This is useful on travis, where manually executing
each command makes it easier to track the time spent on each.
2018-11-16 11:04:50 +01:00
Johan T. Halseth
c6ee2803ad
make: define goveralls 2018-11-16 11:04:50 +01:00
Johan T. Halseth
099a9b7b79
make: remove uneccessary go install
'go install' is done as part of 'go get -u'.
2018-11-16 11:04:50 +01:00
Olaoluwa Osuntokun
4da1c867c3
build: bump version to 0.5.1 2018-11-15 19:47:13 -08:00
Olaoluwa Osuntokun
99dd6f75f8
Merge pull request #2190 from Roasbeef/rescan-btcwallet-fix
build: update to latest version of btcwallet
2018-11-15 19:42:12 -08:00
Olaoluwa Osuntokun
6e06a617b2
build: update to latest version of btcwallet
In this commit, we update to the latest version of btcwallet. This
version includes a bug fix which ensures that the wallet birthday sanity
check only executes once and not each time the deamon is restarted.
2018-11-15 19:08:44 -08:00
Olaoluwa Osuntokun
3f57f65bf0
Merge pull request #2181 from wpaulino/btcwallet-notify-received
build+lnwallet: notify wallet upon relevant transaction confirmation
2018-11-14 21:39:00 -08:00
Wilmer Paulino
9ca9802d9c
lnwallet/btcwallet: check wallet rescan is complete within IsSynced
In this commit, we add an additional check to btcwallet's IsSynced
method to ensure that it is not currently undergoing a rescan. We do
this to block upon starting the server and all other dependent
subsystems until the rescan is complete.
2018-11-14 20:17:36 -08:00
Wilmer Paulino
b1860a95e0
lnwallet/btcwallet: add lightning addr scope before wallet start
In this commit, we add the lightning address scope before the wallet
starts to prevent a race condition between the wallet syncing and adding
the scope itself. This became more apparent with the recent btcwallet
fixes, as several database transactions now occur between the wallet
being started and it syncing.
2018-11-14 20:17:36 -08:00
Wilmer Paulino
f9b15e97f3
build: update btcwallet dependency to address SendOutputs bug
In this commit, we update our btcwallet dependency to include the latest
changes that aim to address the recently discovered SendOutputs bug.

This commit will also allow the lnwallet test case added in the
previous commit to succeed.
2018-11-14 20:17:36 -08:00
Wilmer Paulino
5b42a38c0f
lnwallet/interface_test: add test to detect confirmation of change output spend tx
In this commit, we add a new test to the existing set of wallet tests to
ensure we can properly detect the confirmation of transactions that
spend our change outputs. We do this as a measure to prevent future
regressions from happening where the wallet doesn't request its backend
to be notified of when an on-chain transaction pays to a change address,
like with the recently discovered SendOutputs bug.

As is, this test will not pass until we update the btcwallet dependency
in the next commit.
2018-11-14 20:17:36 -08:00
Wilmer Paulino
255f38e72d
lnwallet/btcwallet: check output is under our control in FetchInputInfo
In this commit, we add an additional check to btcwallet's FetchInputInfo
method to ensure the output is actually under control of the wallet.
Previously, the wallet would assume the output was under its control if
the txid of the output was found within the wallet. This is not a safe
assumption to make however, because if we happened to be the sender of
this transaction, it would be found within the wallet but it's not
actually under our control. To fix this, we explicitly check that there
exists an address in our wallet for this output.
2018-11-14 20:17:36 -08:00
babonet13
4f10771e48
Add EXPOSE directive for 9735 (p2p) & 10009 (rpc)
See EXPOSE additional directive line 32
2018-11-14 14:12:20 +01:00
Olaoluwa Osuntokun
fd5b24fb4e
Merge pull request #2149 from wpaulino/chan-full-proof-node-ann
discovery/gossiper: send node anns when constructing full chan proof
2018-11-13 21:13:57 -08:00
Olaoluwa Osuntokun
2f0bc5c370
Merge pull request #2124 from cfromknecht/wtlookout
[watchtower/lookout]: on-chain breach monitoring
2018-11-13 19:53:07 -08:00
Olaoluwa Osuntokun
adb8bdc359
Merge pull request #2153 from halseth/integration-tests-waitforpendingclose
lnd_test: add waitForChannelPendingForceClose
2018-11-13 16:11:05 -08:00
Johan T. Halseth
776059bdab
Merge pull request #2155 from joostjager/return-tx
lnwallet: update to new SendOutputs signature
2018-11-13 16:39:54 +01:00
Johan T. Halseth
721e9a2a90
Merge pull request #2173 from chokoboko/peer-handshake-timeout-err-msg
peer: Fix handshake timeout error message
2018-11-13 08:18:28 +01:00
Xavi Soler
ebc34a9785 rpc: add missing rest endpoints for SignMessage and VerifyMessage 2018-11-12 18:57:29 +01:00
Francisco Calderón
b61f6fe886
removes duplicated default message on queryroutes command 2018-11-12 12:03:00 -03:00
chokoboko
ec1a77dccb Fix peer handshake timeout error message
Use proper format verb for handshakeTimeout
2018-11-12 12:45:31 +02:00
Johan T. Halseth
881ed08709
Merge pull request #2150 from wpaulino/abandon-channel-rest
lnrpc: modify AbandonChannel REST endpoint
2018-11-12 09:02:37 +01:00
Wilmer Paulino
55094f1470
discovery/gossiper: send node anns when constructing full chan proof
In this commit, we allow the gossiper to also broadcast the
corresponding node announcements, if we know of them, of a channel when
constructing its full proof. We do this to ensure peers (other than our
remote peer) receive all the relevant announcements for a channel.

The tests changes were made to ensure the new behavior introduced works
as intended. Previously, the node announcements for each test channel
announcement were not processed, so they never existed from the
gossiper's point of view.

This also addresses an existing flake in the integration test
`testNodeAnnouncement`. This problem arose due to the node announcement
being sent before the connection between Dave (node announcement sender)
and Alice (node announcement receiver) was initiated and the full
channel proof was constructed.
2018-11-11 17:48:07 -08:00
Wilmer Paulino
c9e79527af
discovery/gossiper: add trace log when skipping unadvertised node ann 2018-11-11 17:48:06 -08:00
Wilmer Paulino
4f45e339f1
discovery+routing: add FetchLightningNode to ChannelGraphSource interface 2018-11-11 17:48:05 -08:00
Joost Jager
e14678030c
lnwallet: update to new SendOutputs signature 2018-11-10 07:57:19 +01:00
Johan T. Halseth
d4b042dc19
Merge pull request #2159 from halseth/integration-tests-net-aware-db
lntest: make DBPath aware of active net
2018-11-09 12:14:55 +01:00
Johan T. Halseth
715db90435
Merge pull request #2170 from AdamISZ/fix-typos-signer
fix two comment typos in signer.go
2018-11-09 11:44:02 +01:00
Johan T. Halseth
c694663d94
Merge pull request #2143 from ErikEk/improv_color_validation
Improving color validation
2018-11-09 09:58:41 +01:00
Johan T. Halseth
d7cbdea9db
lnd_test: add waitForChannelPendingForceClose
This commit introduces a new utility method
waitForChannelPendingForceClose, that is used to ensure a force closed
channel has been recognized by the UTXO nursery, and is ready to be
swept as soon as it matures.

The commit also utilizes this method to properly wait before mining
blocks in certain tests, as it makes sure that the UTXO nursery will
react properly to the new blocks.
2018-11-09 08:50:00 +01:00
Johan T. Halseth
1516ceb37a
Merge pull request #2160 from halseth/integration-tests-mine-reorged-funding-tx
[Integration tests] mine reorged funding tx
2018-11-09 08:48:09 +01:00
Johan T. Halseth
9c3be96490
Merge pull request #2167 from joostjager/nursery-cleanup
utxonursery: clean up unused code
2018-11-09 08:44:44 +01:00
Johan T. Halseth
3df62268ea
Merge pull request #2158 from halseth/integration-tests-remove-externalip
[Trivial] lntest/node: remove extraneous externalip
2018-11-09 08:44:04 +01:00
Johan T. Halseth
b0c6f666f6
Merge pull request #2166 from joostjager/cnct-fixes
cnct: add todo for invalid expiry value handling
2018-11-09 08:43:43 +01:00
Johan T. Halseth
a2b553cf57
Merge pull request #2157 from halseth/integration-tests-remove-log
[Integration tests] remove log disabling hack
2018-11-09 08:42:35 +01:00
ErikEk
f36c58acd7 Improved color validation - now with fixes and a table driven test 2018-11-09 03:09:39 +01:00
Wilmer Paulino
3a314ba4a7
lnrpc: modify AbandonChannel REST endpoint
In this commit, we modify the AbandonChannel REST endpoint to avoid
conflicting with the CloseChannel's. Otherwise, if a debug build of lnd
is being used, there's no way of closing channels through the REST API
as it's been overwritten by AbandonChannel.
2018-11-08 16:16:31 -08:00
AdamISZ
53b1b8837f
fix two comment typos in signer.go 2018-11-08 20:54:02 +01:00
Joost Jager
4cc255676b
utxonursery: use StaticFeeEstimator instead of mock in test 2018-11-07 15:33:36 +01:00
Joost Jager
3c1260941f
utxonursery: remove unused TxOut serialization funcs 2018-11-07 15:33:36 +01:00
Joost Jager
839752857f
cnct: add comment on expiry calculation 2018-11-07 15:29:57 +01:00
Joost Jager
c3560932b6
cnct: fix log line 2018-11-07 15:29:56 +01:00
Johan T. Halseth
3ff6055a62
Merge pull request #1782 from xsb/getinfo-inactive-channels
rpcserver: show inactive channels in GetInfo
2018-11-07 08:45:15 +01:00
Johan T. Halseth
1208c66a89
lnd_test: mine reorged out funding tx 2018-11-06 10:35:05 +01:00