Skip to content
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

Move daemon from main to lnd package #1926

Merged
merged 3 commits into from Apr 26, 2019

Conversation

6 participants
@halseth
Copy link
Collaborator

commented Sep 17, 2018

This PR renames the main package to lnd, and moves the lnd entry point into cmd/lnd.

This intends to make lnd suitable for use as a library, for instance within in other apps. This is also a prerequisite for using lnd with gomobile.

@guggero
Copy link
Contributor

left a comment

LGTM, just a nit that the linter reports.

Show resolved Hide resolved lnd.go Outdated

@halseth halseth referenced this pull request Sep 18, 2018

Merged

Build Package #703

@halseth halseth added this to the 0.6 milestone Sep 19, 2018

@halseth halseth force-pushed the halseth:lnd-package branch from f2d50b2 to 03d32db Sep 19, 2018

@yaslama

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2018

What do you think about adding parameters to Main() in order to be able to run lnd as a library without lnd.conf ? In this case ,the args needs to be passed to loadConfig() as an array of strings and loadConfig needs to use flags.ParseArgs() instead of flags.Parse()

@halseth

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 20, 2018

@yaslama that's a good idea! Probably warrants its own PR though, but will definitely consider it after this change goes in 👍

@halseth halseth force-pushed the halseth:lnd-package branch from 7957fc2 to 34c7e57 Oct 8, 2018

@halseth halseth force-pushed the halseth:lnd-package branch from 34c7e57 to 9634cc8 Oct 19, 2018

@Roasbeef

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

Needs rebase!

@halseth halseth force-pushed the halseth:lnd-package branch from 9634cc8 to 06ce0b9 Dec 5, 2018

@halseth

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 5, 2018

Rebased!

@cfromknecht
Copy link
Collaborator

left a comment

LGTM 💯

@wpaulino
Copy link
Collaborator

left a comment

LGTM 📱

lnd.go Outdated
// created in the top-level scope of a main method aren't executed if os.Exit()
// is called.
func Main() error {

This comment has been minimized.

Copy link
@wpaulino

wpaulino Dec 6, 2018

Collaborator

Nit: extra newline.

This comment has been minimized.

Copy link
@halseth

halseth Dec 6, 2018

Author Collaborator

Fixed.

@halseth halseth dismissed stale reviews from wpaulino and cfromknecht via 667d8f7 Dec 6, 2018

@halseth halseth force-pushed the halseth:lnd-package branch from 06ce0b9 to 667d8f7 Dec 6, 2018

@Roasbeef Roasbeef added this to To do in High Priority Dec 18, 2018

@Roasbeef Roasbeef removed this from the 0.6 milestone Jan 16, 2019

@halseth halseth force-pushed the halseth:lnd-package branch 3 times, most recently from c060bb1 to d664bcb Jan 24, 2019

halseth added some commits Jan 24, 2019

@halseth halseth force-pushed the halseth:lnd-package branch from d664bcb to ccff4fc Apr 23, 2019

@Roasbeef Roasbeef merged commit b44556f into lightningnetwork:master Apr 26, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on lnd-package at 59.886%
Details

High Priority automation moved this from To do to Done Apr 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.