Commit Graph

29 Commits

Author SHA1 Message Date
Wilmer Paulino
0a2986355e
pilot: improve error when unable to reach any of a peer's addresses 2018-08-29 02:06:03 -07:00
Wilmer Paulino
e1a4657427
pilot: remove disconnection logic from chanController
In this commit, we remove the disconnection logic within the
chanController when failing to open a channel with a peer. We do this as
it's already done within the autopilot agent, where it should be, and
because it's possible that we were already connected to this node and we
happened to disconnect them anyway.
2018-08-29 02:06:02 -07:00
Wilmer Paulino
e1a376d9f8
autopilot: use updateBalance rather than tracking balance explicitly
In this commit, we modify the balanceUpdate autopilot signal to update
the balance according to what's returned to the WalletBalance callback
rather than explicitly tracking the balance. This gives the agent a
better sense of what the wallet's balance actually is.
2018-08-29 02:06:02 -07:00
Conner Fromknecht
93f1994dc5
pilot: signal OnNodeUpdates to autopilot 2018-08-23 18:58:12 -07:00
Olaoluwa Osuntokun
4c51f9b5ae
Merge pull request #1693 from wpaulino/autopilot-zero-conf-inputs
multi: allow use of unconfirmed outputs for funding transactions
2018-08-17 17:06:09 -07:00
Johan T. Halseth
2a3b52535e
autopilot: check if already connected before returning error
This commit fixes a small bug that could cause us to disconnect an
already connected peer if no addresses where provided to the ConnectPeer
method. Now we instead first check if we are already connected, and
return early.
2018-08-17 09:26:54 +02:00
Wilmer Paulino
7724d86801
config+pilot: add flag to specify min confs for autopilot agent 2018-08-16 20:19:31 -07:00
Wilmer Paulino
5c414bb1d0
multi: make OpenChannel take in openChanReq 2018-08-16 20:19:26 -07:00
Wilmer Paulino
454b549c7e
autopilot+pilot: refactor connection logic out of OpenChannel
In this commit, we refactor the existing connection logic outside of the
ChanController's OpenChannel method. We do this as previously it was
possible for peers to stall us while attempting to connect to them. In
order to remedy this, we now attempt to connect the peer before tracking
them in our set of pending opens.
2018-08-16 20:17:03 -07:00
Wilmer Paulino
89325a13b7
autopilot+config: support opening private channels with autopilot agent 2018-08-10 20:45:59 -07:00
Wilmer Paulino
9d2eeb6304
multi: update to latest fee estimation interface 2018-08-09 17:29:52 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Wilmer Paulino
2e0484be19
multi: ensure addresses are no longer assumed to be TCP addresses only
In this commit, we go through the codebase looking for TCP address
assumptions and modifying them to include the recently introduced onion
addresses. This enables us to fully support onion addresses within the
daemon.
2018-06-04 20:41:49 -07:00
Conner Fromknecht
f963f91a3c
multi: use mutex-guarded ShortChanID() on OpenChannel 2018-05-09 16:06:49 -07:00
Dimitris Tsapakidis
4009f7f874 multi: fix typos in comments 2018-04-17 19:03:27 -07:00
Johan T. Halseth
208d1199ef
pilot: set remoteCsvDelay=0 (default) for OpenChannel 2018-03-22 14:54:00 +01:00
Olaoluwa Osuntokun
76f7a66259
config+pilot: add new config params to specify min+max autopilot chan size
In this commit, we add two new configuration parameters to allow users
to specify the min and max size that the autopilot agent will create.
This is useful as now users can set the values to more or less the same
size, which will allow them to control the size of each created
channel.

Before this commit, if this wasn’t set, then the agent would try to
shove as much money into a channel up until the max chan size. This was
nice on testnet, but on main net, users will likely not want all their
funds to be in a single channel, and instead be distributed across many
channels. With things like AMP, have more channels becomes more
desirable.
2018-03-18 17:10:28 -07:00
Olaoluwa Osuntokun
602048ae5c
pilot: if unable to establish channel, disconnect peer
In this commit, we fix a quick in the main autopilot handling. If we’re
unable to establish a channel to a peer for w/e reason, then we’ll
disconnect the peer. With this tactic, we avoid unnecessarily building
up tens of peers for no reason at all.
2018-03-10 16:53:03 -08:00
Olaoluwa Osuntokun
1669e3d5ec
lnd: use first key in keychain.KeyFamilyNodeKey as our nodeID
In this commit, we update lnd to now access the deterministic
keychain.KeyRing struct in order to obtain our identity public key.
With this change, if the user recovers their wallet with the same seed,
then they’ll have access to the same prior node identity. This change
also makes it easy for us to support node key rotation in the future by
bumping up our requested index.
2018-03-06 16:04:04 -05:00
Johan T. Halseth
e48d51db92
pilot: express fee rates using types, use EstimateFeePerVSize 2018-02-26 22:42:26 +01:00
MeshCollider
915c4201b9 multi: remove internal peer_id usage 2018-02-19 17:48:39 -08:00
Johan T. Halseth
7805a53c34
pilot: pass minHtlc = 1 satoshi to OpenChannel 2018-01-12 22:56:39 +01:00
Olaoluwa Osuntokun
e5b74174b5
pilot: avoid cancelling the tx subscription twice, use proper wg value
In this commit we fix a newly introduce bug wherein we would close the
transaction subscription twice on shutdown. This would lead to a
shutdown, but an unclean one as it would panic due to closing a channel
twice.

We fix this my removing a defer statement such that, we’ll only cancel
the subscription once.
2018-01-09 12:19:06 -08:00
Olaoluwa Osuntokun
e19614ff3f
pilot: fix goroutine leak by also draining UnconfirmedTransactions notifications 2018-01-08 19:50:21 -08:00
nsa
5c4add8e0e pilot: pass private=false to OpenChannel 2017-12-17 18:35:34 -08:00
Olaoluwa Osuntokun
a3cd248404
funding+utxonursery+breacharbiter: use new FeeEstimator API 2017-11-23 23:10:13 -06:00
Olaoluwa Osuntokun
01b0ddf1c5
lnd+rpc: update RPC responses to convert mSAT to SAT 2017-08-22 00:52:56 -07:00
Olaoluwa Osuntokun
c02710c8c9
test: add +build !rpctest to tests files in main package
This commit adds the +build !rpctest build flag to the test files in
the main package other than the RPC tests. With this, if the protest
build flag is set, then ONLY those tests will be run.
2017-08-10 21:59:23 -07:00
Olaoluwa Osuntokun
8dd4245d43
pilot: implement necessary interfaces to drive an autopilot.Agent
This commit adds a new file to the repo: pilot.go. This files contains
the items necessary to configure, and initialize an instance of
autopilot.Agent with the passed configuration struct.
2017-08-10 21:39:11 -07:00