Commit Graph
100 Commits
Author SHA1 Message Date
Wilmer Paulino 5d016f8c62 Merge pull request #3439 from valentinewallace/fix-zero-fwding-policy-updates
discovery+switch: apply zero forwarding policy updates in-memory as w…
2019-09-10 01:00:14 -07:00
Wilmer Paulino 38c64b2030 Merge pull request #3433 from halseth/atpl-nodescore-tracelogs
[autopilot] Add trace logging during node scoring
2019-09-04 13:04:10 -07:00
Wilmer Paulino d1a4fe7e2e Merge pull request #2088 from wpaulino/lower-mempool-spend-check-timeout
chainntnfs/interface_test: lower mempool spend check timeout
2019-09-04 12:08:06 -07:00
Wilmer Paulino d8dd6b3245 htlcswitch: cap fee updates to max fee allocation
In this commit, we begin to enforce a maximum channel commitment fee for
channel initiators when attempting to update their commitment fee. Now,
if the new commitment fee happens to exceed their maximum, then a fee
update of the maximum fee allocation will be proposed instead if needed.

A default of up to 50% of the channel initiator's balance is enforced
for the maximum channel commitment fee. It can be modified through the
`--max-channel-fee-allocation` CLI flag.
2019-09-03 16:49:59 -07:00
Wilmer Paulino 047d5b173c htlcswitch: refactor TestChannelLinkUpdateCommitFee common code into closure 2019-09-03 16:49:56 -07:00
Wilmer Paulino 59d19e0ca9 lnwallet: add MaxFeeRate method to LightningChannel 2019-09-03 16:49:54 -07:00
Wilmer Paulino d7364d0f28 rpc: populate missing fields for waiting close channels 2019-09-03 14:25:03 -07:00
Wilmer Paulino 06f544a78c cmd/lncli: return error upon missing channel backup when parsing 2019-09-03 14:04:38 -07:00
Wilmer Paulino 578df81fb2 lntest/itest: resolve mempool flake in multi-hop htlc local timeout test
The test assumed that transactions would be broadcast and confirmed at
incorrect heights. Due to timing issues, it was possible for the test to
still succeed, resulting in a flake.

The test assumes that Bob will sweep a pending outgoing HTLC and commit
output back to their wallet. This commit ensures that these operations
are done when expected, i.e.:

1. Bob force closes the channel due to the HTLC timing out.
2. Once the channel is confirmed, Bob broadcasts their HTLC timeout
transaction.
3. Bob broadcasts their commit output sweep transaction once its CSV
expires.
4. Bob broadcasts their second layer sweep transaction for the timed out
HTLC once its CSV expires.
2019-08-30 12:15:14 -07:00
Wilmer Paulino 06206f09b5 Merge pull request #3010 from wpaulino/node-ann-flake
lntest/itest: prevent direct connection within testNodeAnnouncement
2019-08-30 11:55:05 -07:00
Wilmer Paulino 2f6ec77b3c chainntnfs/interface_test: lower mempool spend check timeout
In this commit, we lower the mempool spend check timeout to be twice as
long as the trickle interval of the miner node, which will greatly
improve the execution time of this specific test. We're able to do this
now since we can specify custom trickle intervals for our test
harnesses.
2019-08-29 18:05:46 -07:00
Wilmer Paulino 47a8cd36f7 lntest/itest: prevent direct connection within testNodeAnnouncement
Alice and Dave don't need to be connected in order to receive the node
announcement as we assume that she can receive it from Bob because they
are connected at the beginning of every test.
2019-08-29 18:04:13 -07:00
Wilmer Paulino 2e122a807b Merge pull request #3406 from cfromknecht/die-spew
pilot+discovery: die spew
2019-08-22 15:33:56 -07:00
Wilmer Paulino 2cc5891c8c lnrpc/walletrpc: use current height as height hint for cpfp
In this commit, we address an issue that would cause us to scan from the
genesis block for the spend of an output that we wish to use to raise
the fee of a transaction through CPFP. This was due to setting a 0
height hint when constructing the input required by the sweeper and was
discovered due to the recently added validation checks at the chain
notifier level. We'll now use the current height as the height hint
instead as the sweeper will end up creating a new transaction that
spends the input.
2019-08-22 13:49:42 -07:00
Wilmer Paulino 9e8a1707cc lnwallet: modify FetchInputInfo to return additional information for utxos 2019-08-22 13:49:41 -07:00
Wilmer Paulino 8b398bdbd1 sweep: remove unnecessary use of FetchInputInfo within CraftSweepAllTx
We already have all of the information required for the outputs from the
ListUnspent method.
2019-08-22 13:49:40 -07:00
Wilmer Paulino c7bdfe149a lnwallet/btcwallet: remove internal utxoCache
The cache wasn't really serving a purpose as FetchInputInfo isn't known
to be a hot path. Also, with a planned addition of returning the
confirmation status of an output within FetchInputInfo in a later
commit, caching won't be useful as we'll have to go to disk anyway to
determine the confirmation status.
2019-08-22 13:49:39 -07:00
Wilmer Paulino a9efb61767 lnwallet: remove irrelevant fields in Utxo struct
These fields are only relevant for spent transaction outputs.
2019-08-22 13:49:38 -07:00
Wilmer Paulino cb1d6683d9 chainntnfs: acquire TxNotifier lock after closing quit chan
This prevents a deadlock while tearing down the TxNotifier if it's
currently blocked delivering a notification. By closing the quit chan
first, we ensure blocked sends/reads can exit and allow the TxNotifier
to proceed tearing down.
2019-08-22 13:49:38 -07:00
Wilmer Paulino 17b6205f3a chainntnfs: validate conf/spend ntfn registration parameters
A height hint not being set would cause lnd to scan for the
confirmation/spend of a txid/outpoint/address from genesis.

The number of confirmations not being set within a confirmation request
would cause the internal TxNotifier to deadlock when dispatching
updates.
2019-08-22 13:49:37 -07:00
Wilmer Paulino 7821eb6ffb chainntnfs: refactor common registration code within RegisterSpendNtfn 2019-08-22 13:49:35 -07:00
Wilmer Paulino 5089311ca1 chainntnfs: refactor common registration code within RegisterConfirmationsNtfn 2019-08-22 13:49:33 -07:00
Wilmer Paulino c4ba5577cc Merge pull request #3366 from wpaulino/prevent-initial-gossip-sync-broadcast
discovery: prevent broadcast of anns received during initial graph sync
2019-08-21 13:07:14 -07:00
Wilmer Paulino e15e524637 discovery: prevent broadcast of anns received during initial graph sync
There's no need to broadcast these as we assume that online nodes have
already received them. For nodes that were offline, they should receive
them as part of their initial graph sync.
2019-08-21 12:06:33 -07:00
Wilmer Paulino 938516ec5a Merge pull request #3387 from cfromknecht/tlv-primtive-test
tlv: add tests for all primitive encodings
2019-08-14 12:46:45 -07:00
Wilmer Paulino c405e89197 discovery: check non-nil syncer upon historical sync tick 2019-08-13 18:23:05 -07:00
Wilmer Paulino 51216c6e5e cmd/lncli: properly set synced_to_graph for getinfo command 2019-08-13 17:40:18 -07:00
Wilmer Paulino 8ca2c79bfe rpc: expose graph synced status within GetInfo 2019-08-06 17:56:56 -07:00
Wilmer Paulino 977c139f3c discovery: handle graph synced status after stalled initial historical sync
This ensures that the graph synced status is marked true at some point
once a historical sync has completed. Before this commit, a stalled
historical sync could cause us to never mark the graph as synced.
2019-08-06 17:56:55 -07:00
Wilmer Paulino af4234f680 discovery: allow the SyncManager to report whether the graph is synced 2019-08-06 17:56:54 -07:00
Wilmer Paulino 0690c8f627 watchtower/wtclient: only reset iterator once we've exhausted all candidates
Doing so allows us to load balance sessions better amongst all of the
tower candidates.
2019-07-30 15:18:18 -07:00
Wilmer Paulino 0431701262 multi: only allow specifying towers to TowerClient through RPC
With the introduction of the WatchtowerClient RPC subserver, the lnd
configuration flag to specify private watchtowers for the client is no
longer needed and can lead to confusion upon users. Therefore, we remove
the flag completely, and only rely on the watchtower client being active
through a new --wtclient.active flag.
2019-07-30 15:18:17 -07:00
Wilmer Paulino 359b2049b6 watchtower: load persisted towers upon TowerClient creation
We do this as a convenience for WatchtowerClient users so that they do
not need to re-add towers upon restarts. We ensure not to re-add towers
that have been previously removed by determining whether it has any
lingering active sessions.
2019-07-30 15:18:17 -07:00
Wilmer Paulino 787986283c cmd/lncli: add watchtower client commands 2019-07-30 15:18:16 -07:00
Wilmer Paulino 8f010abac5 multi: add watchtower client RPC subserver 2019-07-30 15:18:15 -07:00
Wilmer Paulino c57128097e watchtower/wtclient: extend TowerClient with CRUD operations for towers
In this commit, we extend the wtclient.Client interface with the
following methods:

  * AddTower
  * RemoveTower
  * RegisteredTowers
  * LookupTower
  * Stats

Care has been taken to ensure that any in-memory state updates are
_only_ performed after a successful database update.

These methods are currently unused, but they serve as a dependency for
the upcoming WatchtowerClient RPC subserver.
2019-07-30 15:18:13 -07:00
Wilmer Paulino 06d10d8100 watchtower/wtclient: extend TowerCandidateIterator to update candidates 2019-07-30 15:13:24 -07:00
Wilmer Paulino 1d73a6564f watchtower: extend client databse with CRUD operations for towers
These operations are currently unused, but will be integrated into the
TowerClient at a later point as future preparation for the
WatchtowerClient RPC subserver, which will allow users to add, remove,
and list the watchtowers currntly in use.
2019-07-30 15:13:23 -07:00
Wilmer Paulino 56d66c80a1 watchtower: extend client db to filter sessions for a specific tower
This currently takes O(N) time as there does not exist an index of
active client sessions for each watchtower within the client's database.
This index is likely to be added in the future.
2019-07-30 15:13:22 -07:00
Wilmer Paulino 4abadc82f3 watchtower/wtclient: export clientStats 2019-07-30 15:13:21 -07:00
Wilmer Paulino 159883665d wtclient: refactor client creation after database calls 2019-07-30 15:13:20 -07:00
Wilmer Paulino 76f9c9bd52 watchtower/wtclient: remove stale sessionQueue TODO
The state updates that are pending to be acked by the tower are already
loaded within newSessionQueue.
2019-07-30 15:13:17 -07:00
Wilmer Paulino 24ca962f75 htlcswitch: lower max outgoing cltv expiry to one week worth of blocks
The current value was based on the previous default CLTV delta of 144
blocks. This has been lowered to 40 since lnd v0.6.0-beta, making the
current value of 5000 blocks a bit high. Lowering it to one week should
be more than enough to account for the other major lightning
implementations. Eclair currently has a default CLTV delta of 144, while
c-lightning's is 14.
2019-07-26 18:06:40 -07:00
Wilmer Paulino 87ff463abd htlcswitch+lnd: make max cltv expiry configurable 2019-07-26 18:05:58 -07:00
Wilmer Paulino 99d9e3caeb server: use custom wtclient policy instead of default 2019-07-24 18:16:18 -07:00
Wilmer Paulino 1d2aba8cd4 watchtower/wtpolicy: properly set DefaultSweepFeeRate and MinSweepFeeRate
These values were intended to be 10 sat/vbyte and 4 sat/vbyte
respectively, but the conversion was done incorrectly.
2019-07-24 18:12:48 -07:00
Wilmer Paulino eb8576aa8d config: default autopilot min confs to 1
This prevents spending unconfirmed funds by default. Users will have to
explicitly set this to 0 in order to do so.
2019-07-24 11:59:28 -07:00
Wilmer Paulino 4e8fb4d32b Merge pull request #3337 from carlaKC/I3336-removeregtestsyncwait
lnd: Add regtest exception for wait to sync on startup
2019-07-23 15:38:27 -07:00
Wilmer Paulino 1730f1ea72 Merge pull request #3325 from wpaulino/lnd-log-error
lnd: log error if any throughout initialization
2019-07-17 16:05:06 -07:00
Wilmer Paulino 0d3ef43c92 lnd: log error if any throughout initialization
In this commit, we establish a new pattern to always log errors before
returning them to the higher level caller, which then prints the error
to stdout/stderr. Errors returned are usually lowercase, but we decide
not to apply this rule here as these errors should not be chained
forward.
2019-07-17 14:24:21 -07:00
Wilmer Paulino 62d716d3c3 chainregistry: properly close neutrino database upon errors 2019-07-15 13:42:01 -07:00
Wilmer Paulino e147445c08 lnd: prevent panic on nil neutrino cleanup
A cleanup closure is not included when an error is returned, causing the
defer to execute and triggering the following panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x105da38]

goroutine 1 [running]:
github.com/lightningnetwork/lnd.Main(0x2083e40, 0xc0004f6db0)
	/home/user/lnd/lnd.go:208 +0x2bfa
main.main()
	/home/user/lnd/cmd/lnd/main.go:14 +0x26
2019-07-15 13:32:37 -07:00
Wilmer Paulino 4faed1deff build: update btcwallet and zmq dependencies
* We address an issue where we would unnecessarily time out bitcoind ZMQ
  connections if there are no messages to be read. This would cause
  connections to be torn down, which would then trigger the reconnection
  logic and prevent us from detecting this issue.

* A new sanity check within the wallet is done to prevent adding
  unconfirmed transactions that the wallet has already recognized as
  confirmed.
2019-07-12 02:40:16 -07:00
Wilmer Paulino 5c11dd44d7 Merge pull request #3297 from orbitalturtle/makefile-case-clarification
MAKEFILE: Clarify what the testcase argument is
2019-07-11 14:40:29 -07:00
Wilmer Paulino 93aad89f4c Merge pull request #3296 from exfrog/patch-1
Update recovery.md (typo)
2019-07-10 20:52:16 -07:00
Wilmer Paulino f9816330c5 Merge pull request #3238 from breez/chan_reserve_fields
rpc: add channel reserve fields in RPC responses.
2019-07-10 16:30:33 -07:00
Wilmer Paulino d67d3e6258 Merge pull request #3295 from Roasbeef/remove-catch-all-code-owners
CODEOWNERS: remove top level catch all
2019-07-10 13:15:53 -07:00
Wilmer Paulino 03cf9a53e4 Merge pull request #3293 from halseth/bumpfee-doc
[trivial] lnrpc: make BumpFee doc start with RPC name
2019-07-10 12:02:41 -07:00
Wilmer Paulino 383dd8111b build: use github mirror of bsaes dependency
This allows us to not depend on external hosts for third-party
dependencies other than the standard hosts: github.com,
google.golang.org, and gopkg.in.
2019-07-10 11:52:57 -07:00
Wilmer Paulino f819002b7a Merge pull request #1933 from yaslama/transactions-addresses
Add addresses to transactions returned by SubscribeTransactions
2019-07-10 02:34:31 -07:00
Wilmer Paulino 0b070d7604 Merge pull request #3269 from Roasbeef/codeowners
CODEOWNERS: create initial code owners config
2019-07-09 14:41:37 -07:00
Wilmer Paulino 9691f86af0 Merge pull request #3279 from carlaKC/ckc-I1359-listpaymentsMSatFee
lnrpc: Deprecate fee field in payment struct
2019-07-09 14:36:24 -07:00
Wilmer Paulino a575b5679d Merge pull request #3271 from ottosuess/patch-3
trivial: typo fix (closes #3268)
2019-07-08 15:03:35 -07:00
Wilmer Paulino 8a4665ff87 Merge pull request #3263 from cfromknecht/fix-updatechanpolicy-help
cmd/lncli/commands: fix updatechanpolicy lowest possible fee msg
2019-07-08 13:46:44 -07:00
Wilmer Paulino 67132d4ee3 discovery: set source of node announcement broadcast to belonging node
We do this to ensure the node announcement propagates to our channel
counterparty. At times, the node announcement does not propagate to them
when opening our first channel due to a race condition between
IsPublicNode and processing announcement signatures. This isn't
necessary for channel updates and announcement signatures as we send
those to our channel counterparty directly through the reliable sender.
2019-06-20 13:59:37 -07:00
Wilmer Paulino dff7fba40a server: properly set stopping atomic var upon shutdown 2019-06-18 19:38:20 -07:00
Wilmer Paulino 7b7a87cf04 build: update btcwallet dependency to include initial sync improvements 2019-06-14 01:36:04 -07:00
Wilmer Paulino c8ef9a4f63 Merge pull request #3199 from halseth/itest-output-file
[trivial] Update output log file location to itest package
2019-06-12 15:03:11 -07:00
Wilmer Paulino 5af4022b6d Merge pull request #3140 from wpaulino/sweeper-bumpfee
sweep+rpc: add support to bump fee of inputs/transactions
2019-06-12 12:21:53 -07:00
Wilmer Paulino c4546081c3 Merge pull request #3172 from joostjager/sendtoroute-timeout
routing+lnrpc: move default payment timeout out of router
2019-06-11 16:27:19 -07:00
Wilmer Paulino 638355b603 lntest: add CPFP integration test 2019-06-11 15:06:41 -07:00
Wilmer Paulino d41af9a65f cmd/lncli: expose bumping fee of inputs/transactions over lncli 2019-06-11 15:06:40 -07:00
Wilmer Paulino a4675063b7 lnrpc/walletrpc: expose bumping fee of inputs/transactions over RPC
This RPC exposes the recently added BumpFee functionality to the
UtxoSweeper in order to allow users of the RPC to manually bump fees of
low fee inputs/transactions.
2019-06-11 15:06:40 -07:00
Wilmer Paulino e69d93949c sweep: allow fee bumps of inputs/transactions within UtxoSweeper
In this commit, we introduce the ability to bump the fee of an input
within the UtxoSweeper. Once its fee rate is bumped, a replacement
transaction (RBF) will be broadcast with the newer fee rate (assuming
the newer fee rate is high enough to be valid), replacing any
conflicting lower fee rate transactions.

Note that this currently doesn't validate the fee preference of the
bump. This responsibility is delegated to the caller, so care must be
taken to ensure the new fee preference is sufficient.
2019-06-11 15:06:38 -07:00
Wilmer Paulino f206444e96 sweep: assert transaction fee rate in TestDifferentFeePreferences 2019-06-11 15:06:36 -07:00
Wilmer Paulino c70858dc46 sweep: prevent default fee preference fallback
We want to make sure clients are aware of their own fee preferences,
rather than relying on defaults.
2019-06-11 15:06:35 -07:00
Wilmer Paulino 2ccd93a2d0 Merge pull request #3031 from neevai/patch-1
Added NETWORK env var to btcd service
2019-06-06 13:12:27 -07:00
Wilmer Paulino 1d8b70eaa6 cmd/lncli: expose pending input sweeps within UtxoSweeper over lncli 2019-06-06 03:23:19 -07:00
Wilmer Paulino d01f88ecdc lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Wilmer Paulino d75fac26bc sweep: expose pending input sweeps within the UtxoSweeper 2019-06-05 12:10:32 -07:00
Wilmer Paulino 50a8f188a3 sweep: add lastFeeRate field to PendingInput
This will serve useful when exposing the pending inputs over RPC, since
we currently don't keep track of the last fee rate used for an input.
2019-06-05 12:10:31 -07:00
Wilmer Paulino 18342410f0 travis: fix log upload regression after itest move 2019-06-04 15:03:54 -07:00
Wilmer Paulino e6c0ddc825 Merge pull request #3155 from halseth/sendtoroute-zero-value
routing/router: correct SendToRoute's amount record in DB
2019-06-04 14:57:41 -07:00
Wilmer Paulino 682aebdd53 sweep: broadcast sweep transactions in descending fee rate order
In this commit, we address another issue that arose with the
introduction of the fee rate buckets. We'll use an example to explain
the problem space:

Let's say we have inputs A, B, and C within the same fee rate bucket. If
A's fee rate is bumped to a higher bucket, then it's currently possible
for the lower fee rate bucket to be swept first, which would produce an
invalid RBF transaction since we're removing an input from the original
without providing a higher fee. By the time we get to the higher fee
rate bucket, we broadcast a valid RBF transaction _only_ sweeping input
A, which would evict the transaction sweeping inputs B and C from the
mempool.

To prevent this eviction, we can simply broadcast the higher fee rate
sweep transactions first, to ensure we have valid RBF transactions.
2019-05-24 15:30:39 -07:00
Wilmer Paulino 5172a5e255 multi: support arbitrary client fee preferences to UtxoSweeper
In this commit, we introduce support for arbitrary client fee
preferences when accepting input sweep requests. This is possible with
the addition of fee rate buckets. Fee rate buckets are buckets that
contain inputs with similar fee rates within a specific range, e.g.,
1-10 sat/vbyte, 11-20 sat/vbyte, etc. Having these buckets allows us to
batch and sweep inputs from different clients with similar fee rates
within a single transaction, allowing us to save on chain fees.

With this addition, we can now get rid of the UtxoSweeper's default fee
preference. As of this commit, any clients using the it to sweep inputs
specify the same fee preference to not change their behavior. Each of
these can be fine-tuned later on given their use cases.
2019-05-24 15:30:38 -07:00
Wilmer Paulino 138d9b68f0 lnwallet+sweep: add String method to FeePreference 2019-05-24 15:30:36 -07:00
Wilmer Paulino 6e0084fec9 Merge pull request #3075 from cfromknecht/crtr-nil-path-curves
routing/router: nil path pubkeys before spewing
2019-05-23 20:01:54 -07:00
Wilmer Paulino 92d780f157 cmd/lncli: properly parse channel backup within lncli create 2019-05-21 15:16:44 -07:00
Wilmer Paulino 8628019ca2 cmd/lncli: properly spend unconfirmed utxos with openchannel 2019-05-17 13:10:12 -07:00
Wilmer Paulino 4eb9ff2abf tor: use string comparison to check min supported version
The current method would not allow version strings like 0.4.0.5 since it
would check every number of the version string individually.
2019-05-03 11:26:59 -07:00
Wilmer Paulino 1ad4528975 lntest: use test subscription to prevent SubscribeChannelGraph race
This race was possible due to us making a subscription request before
the ChannelRouter has started. We address it by creating a dummy
subscription before proceeding to the real one to ensure we can do so
successfully. We use a dummy one in order to not consume an update from
the real one. This addresses the common "timed out waiting for opened
channel" flake within the integration test suite since the subscription
was never properly created, so we'd never be notified of when new graph
updates were received.
2019-04-25 18:53:36 -07:00
Wilmer Paulino d68842ee9e discovery: queue active syncers until initial historical sync signal
In this commit, we begin to queue any active syncers until the initial
historical sync has completed. We do this to ensure we can properly
handle any new channel updates at tip. This is required for fresh nodes
that are syncing the channel graph for the first time. If we begin
accepting updates at tip while the initial historical sync is still
ongoing, then we risk not processing certain updates since we've yet to
learn of the channels themselves.
2019-04-24 13:20:57 -07:00
Wilmer Paulino 07136a5bc2 discovery: handle initial historical sync disconnection
In this commit, we add logic to handle a peer with whom we're performing
an initial historical sync disconnecting. This is required to ensure we
get as much of the graph as possible when starting a fresh node. It will
also serve useful to ensure we do not get stalled once we prevent active
GossipSyncers from starting until the initial historical sync has
completed.
2019-04-24 13:20:55 -07:00
Wilmer Paulino 227e492ccf discovery: make historicalSync transition synchronous
We do this to ensure that the state transition from chansSynced to
syncingChans has occurred by the time we return back to the caller.
2019-04-24 13:20:18 -07:00
Wilmer Paulino 72e9674cff discovery: simplify chooseRandomSyncer helper 2019-04-24 13:20:16 -07:00
Wilmer Paulino 29baa12254 discovery: synchronize new/stale GossipSyncers with syncerHandler
Now that the roundRobinHandler is no longer present, this commit aims to
clean up and simplify some of the logic surrounding initializing/tearing
down new/stale GossipSyncers from the SyncManager. Along the way, we
also synchronize these calls with the syncerHandler, which will serve
useful in future work that allows us to recovery from initial historical
sync disconnections.
2019-04-24 13:19:09 -07:00
Wilmer Paulino 5db2cf6273 discovery+server: remove roundRobinHandler and related code
Since ActiveSync GossipSyncers no longer synchronize our state with the
remote peers, none of the logic surrounding the round-robin is required
within the SyncManager.
2019-04-24 13:19:07 -07:00
Wilmer Paulino 9a6e8ecb9e discovery: remove channel synchronization from ActiveSync GossipSyncers
In this commit, we remove the ability for ActiveSync GossipSyncers to
synchronize our graph with our remote peers. This serves as a starting
point towards allowing the daemon to only synchronize our graph through
historical syncs, which will be routinely done by the SyncManager.
2019-04-24 13:19:06 -07:00
Wilmer Paulino 998680ad59 routing: fall back to edge MaxHTLC within findPath instead of Capacity
In this commit, we make our findPath function use an edge's MaxHTLC as
its available bandwidth instead of its Capacity. We do this as it's
possible for the capacity of an edge to not exist when operating as a
light client. For channels that do not support the MaxHTLC optional
field, we'll fall back to using the edge's Capacity.
2019-04-18 21:57:42 -07:00
Wilmer Paulino 0b0a9f4172 channeldb+routing: refactor DeleteChannelEdge to use ChannelID
In this commit, we refactor DeleteChannelEdge to use ChannelIDs rather
than ChannelPoints. We do this as the only use of DeleteChannelEdge is
when we are pruning zombie channels from our graph. When running under a
light client, we are unable to obtain the ChannelPoint of each edge due
to the expensive operations required to do so. As a stop-gap, we'll
resort towards using an edge's ChannelID instead, which is already
gossiped between nodes.
2019-04-18 21:57:41 -07:00