Commit Graph

66 Commits

Author SHA1 Message Date
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
Olaoluwa Osuntokun
d3cb451ead
funding: run gofmt -s on funding manager tests 2018-03-13 17:09:00 -07:00
PaddyQuinn
c67f1408eb funding: add zombie sweeper tests
Note: This commit also creates a function called
assertFundingMsgSent, which replaces checkNodeSendingFundingLocked
by doing the same work not just for FundingLocked messages but
also for AcceptChannel, FundingCreated, and FundingLocked messages.
2018-03-12 22:11:40 -04:00
Conner Fromknecht
3512cfe836
fundingmanager_test: assert initator funding txn rebcast 2018-03-11 15:06:22 -07:00
Olaoluwa Osuntokun
4b20e805fe
multi: update packages due to recent SignDescriptor and WalletController changes 2018-03-06 16:04:03 -05:00
John Griffith
0468f7b308 fundingmanager: Added additional test to check a pending channel
initiated by the user doesn't timeout.

Split assertNumPendingChannels into assertNumPendingChannelsRemains,
and assertNumPendingChannelsRemains to prevent possible false
positives passing tests
2018-02-26 16:44:34 -08:00
MeshCollider
915c4201b9 multi: remove internal peer_id usage 2018-02-19 17:48:39 -08:00
Johan T. Halseth
997b1ea8ee
fundingmanager: channel constraints closures
This commit makes more channel constraints available
via closures part of the fundingConfig, moving them
from the reservation.RemoteChanConstraints method.
2018-02-08 18:35:24 -05:00
nsa
d924fcfdf4
funding test: add default constraints to wallet config 2018-02-08 18:35:23 -05:00
Olaoluwa Osuntokun
22951cb364
lnd: account for new lnwire.Sig API and channeldb API changes 2018-02-06 20:14:33 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Olaoluwa Osuntokun
30dbbd69a0
funding+htlcswitch: dynamically update short chan id of existing link
In this commit, we fix an existing bug that would result in some
payments getting “stuck”. This would happen if one side restarted
before the channel was fully locked in. In this case, since upon
re-connection, the link will get added to the switch with a *short
channel ID of zero*. If A then tries to make a multi-hop payment
through B, B will fail to forward the payment, as it’ll mistakenly
think that the payment originated from a local-subsystem as the channel
ID is zero. A short channel ID of zero is used to map local payments
back to their caller.

With fix this by allowing the funding manager to dynamically update the
short channel ID of a link after it discovers the short channel ID.

In this commit, we fix a second instance of reported “stuck” payments
by users.
2018-02-03 18:14:15 -08:00