New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable incoming push amounts on channel opening #2027

Merged
merged 2 commits into from Nov 3, 2018

Conversation

Projects
None yet
5 participants
@mrwhythat
Copy link
Contributor

mrwhythat commented Oct 10, 2018

Implements proposal in #1884.

Progress:

  • config option and check implementation;
  • test.

Fixes #1884.

@mrwhythat mrwhythat force-pushed the mrwhythat:no-incoming-push-amounts-option branch from 5f8e807 to 975e9a3 Oct 10, 2018

Show resolved Hide resolved config.go Outdated
Show resolved Hide resolved server.go Outdated

@mrwhythat mrwhythat force-pushed the mrwhythat:no-incoming-push-amounts-option branch from 975e9a3 to b124190 Oct 11, 2018

@mrwhythat

This comment has been minimized.

Copy link
Contributor

mrwhythat commented Oct 11, 2018

I'm not quite sure about adding another error type (lnwire.ErrNonZeroPushAmount), but it seems ok.

@wpaulino
Copy link
Collaborator

wpaulino left a comment

LGTM ⚡️

Show resolved Hide resolved lnwire/error.go Outdated

@mrwhythat mrwhythat force-pushed the mrwhythat:no-incoming-push-amounts-option branch from b124190 to 3a8e738 Oct 30, 2018

@halseth
Copy link
Collaborator

halseth left a comment

LGTM 👍

Show resolved Hide resolved lnwallet/errors.go Outdated
Show resolved Hide resolved fundingmanager_test.go

mrwhythat added some commits Oct 10, 2018

config: add option to disable incoming push amounts in OpenChannel
This is useful for merchant-side prevention of accidental pushes
during channel opening.

@mrwhythat mrwhythat force-pushed the mrwhythat:no-incoming-push-amounts-option branch from 3a8e738 to 6f3adcd Nov 1, 2018

@Roasbeef Roasbeef merged commit f60012b into lightningnetwork:master Nov 3, 2018

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.004%) to 55.906%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mrwhythat mrwhythat deleted the mrwhythat:no-incoming-push-amounts-option branch Nov 4, 2018

cfg.RejectPush = true
defer func() {
tearDownFundingManagers(t, alice, bob)
cfg.RejectPush = rejectPush

This comment has been minimized.

@cfromknecht

cfromknecht Nov 11, 2018

Collaborator

just leaving a note that this could be lead to a race condition in the unit tests if other tests are reading from cfg in parallel. we can revisit if it surfaces

This comment has been minimized.

@halseth

halseth Nov 12, 2018

Collaborator

Hm yeah, value should probably be copied to the fundingMgr config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment