Commit Graph

77 Commits

Author SHA1 Message Date
Joost Jager
3d7de2ad39
multi: remove dead code 2019-09-10 17:21:59 +02:00
Johan T. Halseth
0405703019
fundingmanager test: add TestFundingManagerFundAll
TestFundingManagerFundAll tests that we can initiate a funding request to
use the funds remaining in the wallet. This should produce a funding tx with
no change output.
2019-07-18 00:58:12 +02:00
Johan T. Halseth
2cd7d5a2a4
fundingmanager test: extract publishing logic into fundChannel, set funding fee during unit tests 2019-07-18 00:58:12 +02:00
Johan T. Halseth
78da62c6f7
fundingmanager tests: run tests in parallel 2019-07-18 00:33:14 +02:00
Johan T. Halseth
452ee6aad4
fundingmanager+server: define MaxPendingChans. RejectPush in funding config
This commit makes the funding manager access the MaxPendingChannels and
RejectPush values from the fundingConfig instead of the global config
struct.

Done to avoid sharing state between tests.
2019-07-18 00:33:14 +02:00
Federico Bond
9bd3055fb8 discovery,fundingmanager: avoid serialization in NotifyWhenOnline 2019-06-04 16:36:21 -03:00
Joost Jager
dff0387363
lntest: move itest into package 2019-05-28 21:43:23 +02:00
Conner Fromknecht
08654786ad
fundingmanager: bump max non-initiator funding timeout to 2 weeks
The previous value was set to two days, which may not be enough to
handle large fee spikes where users still which to submit channels with
a low fee and don't mind lowering their time preference. Since the
timeout is only applied to channels that we don't initiate, there's real
downside since it's not our funds that are locked up.
2019-05-18 15:21:56 -07:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Wilmer Paulino
760f38736e
fundingmanager: populate additional edge info after adding to graph
This commit serves as another stop-gap for light clients since they are
unable to obtain the capacity and channel point of graph edges. Since
they're aware of these things for their own channels, they can populate
the information within the graph themselves once each channel has been
successfully added to the graph.
2019-04-18 21:57:40 -07:00
Conner Fromknecht
f39edd8000
peer: add SendMessageLazy 2019-03-05 17:08:22 -08:00
Valentine Wallace
5405028948 fundingmanager: inform ChannelNotifier about newly open channels. 2019-02-05 18:17:54 -08:00
Joost Jager
9e012ecc93
multi: move Input interface and related code
This commit is a step to split the lnwallet package. It puts the Input
interface and implementations in a separate package along with all their
dependencies from lnwallet.
2019-01-31 13:25:33 +01:00
Olaoluwa Osuntokun
b4c5833325
Revert "fundingmanager_test: add TestFundingManagerRejectInvalidMaxValueInFlight"
This reverts commit eb618051208dbd8bb0c160001052b5cc36174888.
2019-01-29 18:31:04 -08:00
Valentine Wallace
4fb1536f54
fundingmanager_test: verify max HTLC in ChannelUpdates
In this commit, we verify that ChannelUpdates for newly
funded channels contain the max HTLC that we expect.
We expect the max HTLC value of each ChannelUpdate to
equal the maximum pending msats in HTLCs required by
the remote peer.

Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2019-01-22 08:42:30 +01:00
Johan T. Halseth
4f9de9bf1d
fundingmanager_test: add TestFundingManagerRejectInvalidMaxValueInFlight 2019-01-22 08:42:30 +01:00
Wilmer Paulino
4f953afeee
lnwallet+fundingmanager: enforce max MinAcceptDepth within funding proposals 2019-01-11 17:05:35 -08:00
Joost Jager
6389a97708
utxonursery: connect to time-based sweeper
Previously, nursery generated and published its own sweep txes. It
stored the sweep tx in nursery_store to prevent a new tx with a new
sweep address from being generated on restart.

In this commit, sweep generation and publication is removed from nursery
and delegated to the sweeper. Also the confirmation notification is
received from the sweeper.
2018-12-18 10:50:20 +01:00
Joost Jager
91f3df07e4
lnwallet: prevent static fee estimator fees from being modified
Modifying the static fees is not thread safe. In this commit the fees
are made immutable.
2018-12-18 10:50:05 +01:00
Olaoluwa Osuntokun
f60012b3f9
Merge pull request #2027 from mrwhythat/no-incoming-push-amounts-option
Option to disable incoming push amounts on channel opening
2018-11-02 17:08:05 -07:00
whythat
6f3adcd490 fundingmanager test: add test for 'rejectpush' option 2018-11-02 01:55:18 +02:00
Wilmer Paulino
85cdb18b73
fundingmanager: send NodeAnnouncement to unadvertised channel counterparty
In this commit, we modify the funding manager to send our
NodeAnnouncement to our channel counterparty in the event of an
unadvertised channel. We do this to ensure that our counterparty learns
about some information about us that may aid them in one way or another
(e.g., addresses to reconnect, features supported, etc.).
2018-10-24 19:20:01 -07:00
Conner Fromknecht
10b35a8f20
main: remove disable log in testing + clean up imports 2018-10-05 13:04:45 +09:00
Johan T. Halseth
a433e70575
fundingmanager test: satisfy new interfaces 2018-09-28 09:05:01 +02:00
maurycy
ac24b12bf2
multi: fix various typos in comments 2018-09-07 06:51:49 +02:00
Olaoluwa Osuntokun
19552b0dbf
htlcswitch+funding+discovery: update mock peers to add new QuitSignal method 2018-08-25 17:30:15 -07:00
Olaoluwa Osuntokun
a1a6845fb5
Merge pull request #1731 from halseth/link-policy-persist
Correctly apply min_htlc to forwarding policy
2018-08-23 19:21:44 -07:00
Johan T. Halseth
e069dd7f04
fundingmanager test: test that custom MinHTLC is in ChannelUpdate 2018-08-23 07:50:17 +02:00
Johan T. Halseth
6a6d3ff557
funding tests: account for returned err channel 2018-08-23 07:40:41 +02:00
Valentine Wallace
1ffc3bb82e
multi: update to latest RegisterBlockEpochNtfn interface 2018-08-10 01:08:57 -07:00
Olaoluwa Osuntokun
d2612e51bd
Merge pull request #1644 from wpaulino/kw-fees
multi: switch to sat/kw fees
2018-08-09 20:19:28 -07:00
Olaoluwa Osuntokun
d64bb5921e
Merge pull request #1635 from halseth/funding-broadcast-fail
Move funding tx broadcasting to Fundingmanager
2018-08-09 20:04:30 -07:00
Wilmer Paulino
9d2eeb6304
multi: update to latest fee estimation interface 2018-08-09 17:29:52 -07:00
Olaoluwa Osuntokun
40806532c7
funding: fix import paths for test 2018-07-31 21:29:03 -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
8aef43360f
funding: update fundingManager to register for conf's using pkScripts 2018-07-31 21:28:51 -07:00
Johan T. Halseth
b437d03174
fundingmanager test: add TestFundingManagerMaxPendingChannels 2018-07-31 14:53:22 +02:00
Johan T. Halseth
b885e8d288
fundingmanager test: check reservation canceled after tx broadcast 2018-07-31 14:53:21 +02:00
Johan T. Halseth
d7b2977e8c
multi test: remove mempool bool from RegisterSpendNtfn 2018-07-22 23:09:08 +02:00
Wilmer Paulino
d54d41eed7
fundingmanager: update tests to latest changes 2018-07-19 12:34:13 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
Johan T. Halseth
3d964628f0
fundingmanager test: check that error is sent on timeout 2018-06-01 08:55:07 +02:00
Wilmer Paulino
2e076ba21e
fundingmanager+lnd: propose remote channel reserve above dust limit 2018-05-14 14:20:19 -04:00
Conner Fromknecht
0c22297379
fundingmanager_test: mock ReportShortChanID w/o sid arg 2018-05-09 16:07:52 -07:00
Johan T. Halseth
7c945b42fe
fundingmanager_test: remove ArbiterChan 2018-05-02 08:43:31 +02:00
Johan T. Halseth
ed2cfd74c1
fundingmanager test: test that MinHtlc is preserved during flow 2018-04-06 10:02:19 +02:00
Johan T. Halseth
cbfba79f46
fundingmanager test: add test for custom channel parameters
This commit adds TestFundingManagerCustomChannelParameters, which checks
that custom channel parameters specified at channel creation is
preserved and recorded correctly on both sides of the channel.
2018-04-06 10:02:19 +02:00
Johan T. Halseth
ed6682ea4a
multi test: make mock adhere to api change 2018-04-03 22:04:02 +02:00
Conner Fromknecht
3eb53467e0
fundingmanager_test: init WatchNewChannel 2018-03-31 02:00:05 -07:00
Conner Fromknecht
0c6a85d5f7
fundingmanager_test: use renamed defaultBtcChannelConstraints const 2018-03-14 16:57:42 -07:00