Commit Graph

5685 Commits

Author SHA1 Message Date
Joost Jager
b5da791271
utxonursery: assert lingering goroutines 2018-09-23 15:52:46 -07:00
Joost Jager
f1590a15e7
makefile: dump all goroutines on panic
To provide more diagnostic information when unit tests panic.
2018-09-23 15:52:46 -07:00
Joost Jager
9f6fb1e128
utxonursery: test restart behaviour 2018-09-23 15:52:45 -07:00
Joost Jager
83a5ea0c31
utxonursery: add test coverage for outgoing htlc 2018-09-23 15:51:35 -07:00
Wilmer Paulino
828ecfe343
peer: skip sending active channel updates for pending open channels
In this commit, we skip sending active channel update for pending open
channels as they are not yet part of the graph.
2018-09-21 17:26:37 -07:00
Wilmer Paulino
99a4952239
server+peer: check ErrEdgeNotFound when enabling/disabling a channel
In this commit, we also check ErrEdgeNotFound when attempting to send an
active/inactive channel update for a channel to the network. We do this
as it's possible that a channel has confirmed, but it still does not
meet the required number of confirmations to be publicly announced.
2018-09-21 17:24:36 -07:00
Wilmer Paulino
f13c1d2787
channeldb: ensure channel buckets are only created once
In this commit, we ensure that we only create the sub-bucket for
channels once: at the time of creation. We do this as otherwise it's
possible that a method that mutates a channel's state is called after it
has already been closed on-chain, leading to the channel bucket being
recreated.
2018-09-21 17:14:59 -07:00
Olaoluwa Osuntokun
f4305097e1
Merge pull request #1295 from joostjager/forget
rpc: add support for a `forgetchannel` RPC only enabled w/ the debug flag
2018-09-21 17:13:01 -07:00
Olaoluwa Osuntokun
b96745e623
Merge pull request #1847 from halseth/kidoutput-height-hint
[utxonursery] Use kidoutput broadcast height as height hint
2018-09-21 16:39:54 -07:00
Olaoluwa Osuntokun
8cb93014eb
Merge pull request #1953 from cfromknecht/remove-neutrino-shadowed-height
chainntnfs/neutrinonotify/neutrino: remove height shadowing
2018-09-21 15:48:35 -07:00
Conner Fromknecht
b5b8602820
chainntnfs/neutrinonotify/neutrino: remove height shadowing
This commit removes shadowing of the currentHeight
variable when registering for neutrino spend
notifications. Currently, a locally scoped variable
is used when determining if the backend is fully
synced before attempting to call GetUtxo, which
means that the variable won't be updated after
breaking out of the loop. As a result, this could
cause us to scan unnecessarily if the backend is
catching up, e.g. after being offline for some time.
2018-09-20 18:47:04 -07:00
Joost Jager
a75b0c871b
lnd_test: add AbandonChannel test 2018-09-20 18:33:47 -07:00
Conner Fromknecht
652ec893e0
lntest/node: persist network subscription state across restarts 2018-09-20 18:28:48 -07:00
Joost Jager
f34ffab9ba
cnct: add channel_arbitor test that exercises the htlcOutgoingContestResolver 2018-09-20 18:17:23 -07:00
Johan T. Halseth
0a5f982280
utxonursery: pass broadcastHeight to registerPreschoolConf
In this commit IncubateOutputs are given an extra parameter
broadcastHeight, which is passed from the server and used when called
registerPresschoolConf.

Earlier the utxonursery used the bestHeight as height hint in this case,
which would be wrong in the cases where we got outputs for incubation
which was confirmed below the best height.
2018-09-20 13:16:39 +02:00
Johan T. Halseth
3a67fe2552
contractcourt+server: make IncubateOutputs take broadcastHeight 2018-09-20 12:54:48 +02:00
Johan T. Halseth
6d0deed885
utxonursery test: run tests in parallel 2018-09-20 12:54:48 +02:00
Olaoluwa Osuntokun
6d759bd8d9
Merge pull request #1911 from wpaulino/tor-controller-if-inbound
server: start tor controller if we should listen for inbound connections
2018-09-19 20:32:16 -07:00
Joost Jager
ab67b9a4de
rpcserver+lnrpc+lncli: add AbandonChannel rpc call
Using AbandonChannel, a channel can be abandoned. This means
removing all state without any on-chain or off-chain action.
A close summary is the only thing that is stored in the db after
abandoning.

A specific close type Abandoned is added. Abandoned channels
can be retrieved via the ClosedChannels RPC.
2018-09-18 12:20:27 -07:00
Joost Jager
3b6f7fdb83
gitignore: ignore visual studio code config 2018-09-18 07:17:44 -07:00
Olaoluwa Osuntokun
25145acc46
Merge pull request #1738 from joostjager/validation
payment failure message with attached channel_update not validated
2018-09-17 21:11:02 -07:00
Olaoluwa Osuntokun
8a2b3bf369
Merge pull request #1932 from Desuuuu/tor-controller-parse-fix
tor/controller: fix response parsing for values containing the '=' character
2018-09-17 20:55:06 -07:00
Desuuuu
23c03cc51f tor/controller: fix response parsing for values containing the '=' character 2018-09-18 02:56:24 +02:00
Olaoluwa Osuntokun
032234c4c8
Merge pull request #1925 from cfromknecht/migration-efficiency
channeldb/migrations: improve performance of edge update migration
2018-09-17 15:41:14 -07:00
Johan T. Halseth
9a3e19b77f
Merge pull request #1916 from guggero/crash-on-listchaintxns
rpcserver: handle unconfirmed TX properly when listing all transactions
2018-09-17 20:05:26 +02:00
Conner Fromknecht
974ec02d24
channeldb/migrations: improve performance of edge update migration
This commit modifies the edge update index
migration to avoid repetitive calls to
Cursor.First(). Instead, we construct a set
of all edge update keys to remove, and then do
a second pass to remove each from the bucket.
Additional log messages are included to notify
users on progress, as some have reported long
migration times.
2018-09-17 00:05:24 -07:00
Oliver Gugger
10b976187d
rpcserver: handle unconfirmed TX properly when listing all transactions 2018-09-15 11:29:32 +02:00
Wilmer Paulino
fb059ddaa5
server: start tor controller if we should listen for inbound connections
over Tor

In this commit, we fix a small bug where we would attempt to start the
Tor controller even if we were not requested to automatically create and
onion service in order to listen for inbound connections over Tor.
2018-09-14 13:45:06 -07:00
Olaoluwa Osuntokun
3b2c807288
channeldb: fix bug in migration from 0.4 to 0.5
In this commit, we fix a bug in the latest database migration when
migrating from 0.4 to 0.5. There's an issue in bolt db where if one
deletes a bucket that has a key with a nil value, it thinks that's a sub
bucket and attempts a bucket deletion. This will fail as it's not
actually a sub-bucket.  We get around this by using a cursor to manually
delete items in the
bucket.

Fixes #1907.
2018-09-14 12:39:44 -07:00
Olaoluwa Osuntokun
48d016bc78
Merge pull request #1901 from cfromknecht/clean-vendor-new
make: clean lnd-debug, lncli-debug and .vendor-new
2018-09-13 19:17:35 -07:00
Olaoluwa Osuntokun
a3b75faa02
Merge pull request #1885 from tsarpaul/master
cmd/lncli: Fixed conflicting payinvoice amount output
2018-09-13 19:14:08 -07:00
Olaoluwa Osuntokun
a2d231e828
Merge pull request #1869 from michael1011/makefile-space
Added missing spaces to Makefile
2018-09-13 19:12:40 -07:00
Olaoluwa Osuntokun
5747e8971c
build: update to point to latest version of neutrino
In this commit, we update the build to point to the latest version of
neutrino which includes a bug fix for a regression that would cause the
daemon to spin when at chain tip attempting to always fetch the next set
of headers though it was already fully up to date.
2018-09-13 16:27:35 -07:00
Olaoluwa Osuntokun
b71cb0dbd8
README: add security section in readme 2018-09-13 16:25:18 -07:00
Olaoluwa Osuntokun
f7436f43b2
lnwire: check length of payload in decodeShortChanIDs 2018-09-13 15:57:08 -07:00
Olaoluwa Osuntokun
c5979c7d80
discovery: fix logging for gossip syncer rate limiting 2018-09-13 15:55:44 -07:00
Wilmer Paulino
9c92d60149 lnrpc: update ListInvoices RPC with new pagination support 2018-09-13 15:54:35 -07:00
Wilmer Paulino
fe17adc519 cmd/lncli: update listinvoices docs with new pagination support 2018-09-13 15:54:12 -07:00
Conner Fromknecht
3974dbeda0
make: clean lnd-debug, lncli-debug and .vendor-new 2018-09-13 14:17:33 -07:00
Olaoluwa Osuntokun
9e99f13f8d
Merge pull request #1898 from Roasbeef/fix-migration
channeldb: don't use KeyN in latest migration
2018-09-13 14:12:52 -07:00
Olaoluwa Osuntokun
8909c13d1e
Merge pull request #1863 from wpaulino/query-invoices-default
channeldb+cmd/lncli: enable backwards pagination of listinvoices
2018-09-13 14:11:54 -07:00
Olaoluwa Osuntokun
1c4bd04c55
Merge pull request #1896 from Roasbeef/btcwallet-unconf-txn
lnwallet+rpc: allow unconfirmed transactions to be returned over RPC, fix SubscribeTransaction unconf for neutrino
2018-09-12 22:12:38 -07:00
Wilmer Paulino
08bddece8b
cmd/lncli: add description and reversed flag to listinvoices 2018-09-12 22:12:00 -07:00
Wilmer Paulino
012d4f5c8c
rpcserver: include new proto fields in ListInvoices rpc 2018-09-12 22:11:59 -07:00
Wilmer Paulino
8e151ffd3f
lnrpc: add fields to paginate invoices backwards 2018-09-12 22:11:58 -07:00
Wilmer Paulino
7e6eb44cf8
channeldb/invoice_test: refactor TestQueryInvoices and add reverse test cases 2018-09-12 22:11:57 -07:00
Wilmer Paulino
0fe35e0014
channeldb/invoices: extend invoice queries to allow backwards pagination 2018-09-12 22:11:56 -07:00
Olaoluwa Osuntokun
e6925cc5be
config: fix linter error 2018-09-12 22:10:14 -07:00
Olaoluwa Osuntokun
034198ffb7
channeldb: don't use KeyN in latest migration
In this commit, we fix a bug in the latest migration that could cause
the migration to end in a panic. Additionally, we modify the migration
to exit early if the bucket wasn't found, as in this case, no migration
is required.

Fixes #1874.
2018-09-12 22:06:11 -07:00
Olaoluwa Osuntokun
e23f889639
config: return an error if unable to parse values in the config file 2018-09-12 21:35:32 -07:00