Skip to content

Conversation

jimpo
Copy link
Contributor

@jimpo jimpo commented Nov 17, 2017

Creates an lntest package for testing utilities. For now it just has the NetworkHarness and HarnessNode structs. Some minor refactors to the harness as well.

@jimpo jimpo force-pushed the integration-testing branch 2 times, most recently from c34c478 to ae9b60f Compare November 27, 2017 20:41
@jimpo jimpo force-pushed the integration-testing branch from ae9b60f to 4d1534b Compare November 28, 2017 23:19
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dig the refactor! After this, the package can now be re-used in other projects which need to script the interaction of lnd nodes. Most of my comments a pretty minor, the notable ones are: we now manually the the number of confirmations for a transaction, and about restoring the prior OnTxAccepted callback.

lnd_test.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd line wrapping here. Not replicated in the existing codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you format this declaration to not violate the 80 char limit?

lnd_test.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sending over a raw channel here which is then passed into the lnd harness seems like a step backwards. We can still re-use the same callback method added as we'll still start the btcd harness before we start the lnd harness.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworked this.

lntest/doc.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a godoc comment.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should be updated, this no longer takes the extra command line flags directly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

godoc comment should document the semantics of lndArgs. Based on my earlier comment, I don't think the seenTxns arg is needed at all.

lntest/node.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that in master, we now manually set defaultnumconfs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased.

lntest/node.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing godoc comment.

lnd_test.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is out of order FWIW (it wouldn't compile by itself).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think GitHub just orders the commits weird (by date instead of actually in order). The dates are screwed up because I had to cherry-pick a bunch from another branch.

Jim Posen added 7 commits December 10, 2017 11:53
@jimpo jimpo force-pushed the integration-testing branch 2 times, most recently from 1f30c11 to 20ee9d8 Compare December 10, 2017 20:11
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💎

@Roasbeef Roasbeef merged commit 84d7c7e into lightningnetwork:master Dec 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants