Commit Graph

4706 Commits

Author SHA1 Message Date
Conner Fromknecht
60edca164c
peer: adds StartTime() used to compute backoff relaxation 2018-08-07 14:50:07 -07:00
Olaoluwa Osuntokun
33a5567a0f
Merge pull request #1691 from wpaulino/sync-gopkg
build: sync Gopkg.lock with Gopkg.toml
2018-08-06 16:15:33 -07:00
Wilmer Paulino
17556f4799
build: sync Gopkg.lock with Gopkg.toml 2018-08-06 13:11:46 -07:00
Conner Fromknecht
f0f5e11b82
Merge pull request #1661 from cfromknecht/restore-linter
Makefile: Restore linter
2018-08-03 03:13:58 -07:00
Conner Fromknecht
e3138004ca
Makefile: restore broken linter 2018-08-02 18:20:50 -07:00
Conner Fromknecht
cf2c371042
multi: fix linting errors 2018-08-02 18:20:50 -07:00
Conner Fromknecht
8beeeb1944
macaroons/constraints_test: remove extraneous semicolon 2018-08-02 18:20:50 -07:00
Conner Fromknecht
9eff876f52
routing/pathfind_test: fmt whitespace 2018-08-02 18:20:49 -07:00
Conner Fromknecht
614b3b3862
routing/pathfind: fmt whitespace 2018-08-02 18:20:49 -07:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Conner Fromknecht
d0179eb6b5
Merge pull request #1669 from Roasbeef/funding-mgr-server-init
funding+server: move initialization of funding manager into the server
2018-08-02 14:30:00 -07:00
Olaoluwa Osuntokun
33979b2636
funding+server: move initialization of funding manager into the server
In this commit, we move the initialization of the server into the
funding manager itself. We do this as it's no longer the case that _any_
RPC needs to access the funding manager. In the past, this was the
only reason that the funding manager was instantiated outside of the
server: to be able to respond to queries _before_ the server was
started.

This change also fixes a bug as atm, the funding manager will try to
register for notifications _before_ the ChainNotifier itself has fully
started.
2018-08-01 16:02:55 -07:00
Olaoluwa Osuntokun
f6ea91af71
Merge pull request #1579 from Roasbeef/gcs-modifications
multi: update primary interfaces to be compatible with latest version of BIP 158, use latest btcd+neutrino+btcwallet
2018-08-01 12:41:09 -07:00
Olaoluwa Osuntokun
b1a775b29e
chainntnfs/neutrinonotify: update async conf dispatch to use scripts 2018-07-31 21:29:04 -07:00
Olaoluwa Osuntokun
f7d9b8e6b0
lnwallet: increase timeout in waitForWalletSync for new neutrino re-org logic 2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
40806532c7
funding: fix import paths for test 2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
3c60861005
routing/chainview: give neutrino backend more time to catch up for re-org test
In this commit, we modify the test to explitlcy give the neutrino
backend more time to catch up compared to the RPC backends. We do this
as a recent change has been made in the neutrino backend to wait for the
filter headers to finish syncing before proceeding with the rescan
itself. As a result, we'll need to account for this in the test and
sleep enough to give the backend a chance to catch up.
2018-07-31 21:29:03 -07:00
Olaoluwa Osuntokun
293a377edd
lnwallet: modify IsSynced() for neutrino backend to ensure filter headers are synced 2018-07-31 21:29:02 -07:00
Olaoluwa Osuntokun
2d71b5a0d5
build: update build to point to latest versions of btcd+btcwallet+neutrino 2018-07-31 21:29:02 -07:00
Olaoluwa Osuntokun
d9969f5dc2
contractcourt: update contract resolvers to use pkScripts for spend ntfns 2018-07-31 21:29:01 -07:00
Olaoluwa Osuntokun
c6950fcc2f
contractcourt: update channel arbitrator unit tests due to recent API changes 2018-07-31 21:29:01 -07:00
Olaoluwa Osuntokun
08e11d197d
contractcourt: update chain watcher to make funding pkScript for spend ntfn 2018-07-31 21:29:00 -07:00
Olaoluwa Osuntokun
ac9f9bd061
contractcourt: remove now obsolete code from the chain arbitrator
We no longer need this code fragment as the chain watcher is now able to
handle confirmed cooperative channel closures itself.
2018-07-31 21:29:00 -07:00
Olaoluwa Osuntokun
ab5b8b8fac
breacharbiter: use the pkScript of the breached output for spend ntnfs 2018-07-31 21:28:59 -07:00
Olaoluwa Osuntokun
62ab7424af
breacharbiter: update second level pkScript as well
In this commit, we update the convertToSecondLevelRevoke function to
also upgrade the second level pkScript as well. This is required as
we'll need to use this for a confirmation notification once we sweep the
output in the case that the remote party goes to the second layer.
2018-07-31 21:28:59 -07:00
Olaoluwa Osuntokun
53416260e3
htlcswitch: update test to account for new ChainNotifier API 2018-07-31 21:28:58 -07:00
Olaoluwa Osuntokun
067db8572c
test+lnd: update unit test mocks to adhere to new interface API's 2018-07-31 21:28:58 -07:00
Olaoluwa Osuntokun
88bedec65b
discovery: update unit tests to account for new ChainNotifier API 2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
343c1b80d2
lnwallet: update NewBreachRetribution to include pkScripts for htlc outputs
In this commit, we update the NewBreachRetribution method to include
pkScripts for htlc outputs. We do this now, as the breach arbiter will
need the raw pkScript when attempting to request spend notifications for
each HTLC.
2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
84c458cc9f
lnwallet/btcwallet: update neutrino GetUtxo impl to use new API 2018-07-31 21:28:57 -07:00
Olaoluwa Osuntokun
f9f9eefab4
lnwallet: update GetUtxo to accept the pkScript to comply with new gcs filter 2018-07-31 21:28:56 -07:00
Olaoluwa Osuntokun
21451bf251
lnwallet: update dual funder verification code to use pkscript in GetUtxo 2018-07-31 21:28:56 -07:00
Olaoluwa Osuntokun
8c0a151cec
routing: update UTXO verification to use new interface, graph pruning too 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
fb98f59407
routing/chainview: ensure bitcoind impl meets new interface requirements 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
9b9029cf4b
routing/chainview: ensure btcd impl meets new interface requirements 2018-07-31 21:28:55 -07:00
Olaoluwa Osuntokun
7e6997d6d3
routing/chainview: update neutrino API due to recent changes
In this commit, we ensure that the neutrino backend meets the target
interface, and also we update the API usage for the internal neutrino
rescan struct to use the new InputWithScript struct.
2018-07-31 21:28:54 -07:00
Olaoluwa Osuntokun
ec0fb9c537
routing/chainview: modify the UpdateFilter method to take a channeldb.EdgePoint
In this commit, we update the existing UpdateFilter method to take the
new channeldb.EdgePoint struct in place of the prior wire.OutPoint. We
must do this as the caller now typically has this type due to the
preparation to enable lnd to be able to be compatible with the new
neutrino protocol.
2018-07-31 21:28:54 -07:00
Olaoluwa Osuntokun
d129e7c890
channeldb: update ChannelView to return new EdgePoint struct
In this commit, we update the ChannelView method to be compatible with
the new set of interfaces that require the script to be passed in in
addition to the outpoint. In order to do this, we introduce a new
EdgePoint struct which packages together a channel point along with the
funding pkScript. Along the way, we've copied over a utility method from
the lnwallet package to avoid having to deal with an import cycle.
2018-07-31 21:28:54 -07:00
Olaoluwa Osuntokun
1a5b1d9792
chainntnfs: update interface tests to pass the prev script into RegisterSpendNtfn 2018-07-31 21:28:53 -07:00
Olaoluwa Osuntokun
f87b1a94c5
chainntnfs/neutrinonotify: update neutrino backend to use new API
In this commit, we update the neutrino backend for the ChainNotifier to
use the new API which requires that callers pass the outpoint along with
the pkScript to be notified of any spends.
2018-07-31 21:28:53 -07:00
Olaoluwa Osuntokun
6781b17056
chainntnfs: update bitcoind and btcd backends to match new spend ntfn API 2018-07-31 21:28:53 -07:00
Olaoluwa Osuntokun
7a0b7d2742
chainntnfs: update RegisterSpendNtfn to take the prev output script
In this commit, we update the RegisterSpendNtfn method to also take the
prev output script of the item that we're attempting to watch for. This
change is required due to the recent modifications in the neutrino
protocol (BIP 158 + 157). With the new protocol, we'll match on the
script, but then dispatch notifications based on the precise outpoint
that matches.
2018-07-31 21:28:52 -07:00
Olaoluwa Osuntokun
07defe5f93
rpc+peer: use pkScripts for close ntfns 2018-07-31 21:28:52 -07:00
Olaoluwa Osuntokun
55d6586a67
utxonursery: update to register for confs using pkScripts 2018-07-31 21:28:51 -07:00
Olaoluwa Osuntokun
2d421b8e3c
breacharbiter: update breachArbiter to register for conf's using pkScripts 2018-07-31 21:28:51 -07:00
Olaoluwa Osuntokun
8aef43360f
funding: update fundingManager to register for conf's using pkScripts 2018-07-31 21:28:51 -07:00
Olaoluwa Osuntokun
3268019326
htlcswitch: update mock notifier due to recent API changes 2018-07-31 21:28:50 -07:00
Olaoluwa Osuntokun
8dd0b56d35
lnwallet: publicy export WitnessScriptHash and GenMultiSigScript
In this commit, we export WitnessScriptHash and GenMultiSigScript as
external sub-systems may now need to use these methods in order to be
able to watch for confirmations based on the script of a transaction.
2018-07-31 21:28:50 -07:00
Olaoluwa Osuntokun
c707577e99
contractcourt: update conf ntfn registartions to use pkScript not txid 2018-07-31 21:28:49 -07:00
Olaoluwa Osuntokun
21847dc691
chainntnfs/neutrinonotify: update conf notifications to use pkScript
In this commit, we update the implementation of conf notifications for
neutrino to use the output script rather than the txid when matching
blocks for relevant items. The change itself is rather minor as we just
pass in the script, yet match based on the txid as normal when we go to
dispatch notifications.
2018-07-31 21:28:49 -07:00