forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add goclean #2
Closed
Closed
Add goclean #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit fixes a bug in the wallet’s internal reservation manager that prevented it from cleaning up the resources used by a reservation after it was finished running through the workflow. We fix this issue by ensuring the reservations context is deleted from the funding limbo. It is the callers responsibility to properly .Cancel() a reservation in the case of an error during the funding workflow.
This commit fixes a race condition in the notifyBlockEpochs detected by the race condition detector. Previously the notifyBlockEpochs function could cause a race condition when a new caller was either cancelling an existing notification intent or creating a new one. We fix this issue by making the call to notifyBlockEpochs synchronous rather than asynchronous. An alternative would be to add a mutex guarding the map state. The channel itself is buffered with a good margin, so there shouldn’t be a huge impact.
github.com/lightningnetwork/lnd master ✗ 0m ◒ ▶ golint htlcswitch.go:292:4: should replace numUpdates += 1 with numUpdates++ htlcswitch.go:554:6: var onionId should be onionID htlcswitch.go:629:7: var onionId should be onionID lnd_test.go:133:1: context.Context should be the first parameter of a function lnd_test.go:177:1: context.Context should be the first parameter of a function networktest.go:84:2: struct field nodeId should be nodeID peer.go:1704:16: should omit 2nd value from range; this loop is equivalent to `for invoice := range ...` rpcserver.go:57:6: func newRpcServer should be newRPCServer github.com/lightningnetwork/lnd master ✗ 9m ⚑ ◒ ⍉ ▶ go vet features.go:12: github.com/lightningnetwork/lnd/lnwire.Feature composite literal uses unkeyed fields fundingmanager.go:380: no formatting directive in Errorf call exit status 1
Fix SetStateNumHint and GetStateNumHint to properly set and get the stateNumHints using the lower 24 bits of the locktime of the commitment transaction as the lower 24 bits of the obfuscated state number and the lower 24 bits of the sequence field as the higher 24 bits.
and remove serialization for type [4]byte.
Add tests to assert maximum state can be used. Also test that more than one input in the commitment transaction will fail and that having state number larger than maxStateHint will fail.
Add table-driven tests for testing GetStateHint and SetStateHint in package lnwallet.
Introduce TimelockShift which is used to make sure the commitment transaction is spendable by setting the locktime with it so that it is larger than 500,000,000, thus interpreting it as Unix epoch timestamp and not a block height. It is also smaller than the current timestamp which has bit (1 << 30) set, so there is no risk of having the commitment transaction be rejected. This way we can safely use the lower 24 bits of the locktime field for part of the obscured commitment transaction number.
This commit removes the String() method from the FeatureVector as it can produce confusing output when revving a feature vector and not knowing the strip mapping ahead of time.
In this commit the initial implementation of revocation hash generation 'elkrem' was replaced with 'shachain' Rusty Russel implementation which currently enshrined in the spec. This alghoritm has the same asymptotic characteristics but has more complex scheme to determine wish hash we can drop and what needs to be stored in order to be able to achive full compression.
andrewshvv
added a commit
that referenced
this pull request
Mar 16, 2017
Issue: lightningnetwork#137 In this commit retranmission subsystem and boltdb mesage storage were added. Retransmission subsystem described in details in BOLT #2 (Message Retransmission) section. This subsystem keeps records of all messages that were sent to other peer and waits the ACK message to be received from other side and after that removes all acked messaged from the storage.
andrewshvv
added a commit
that referenced
this pull request
May 4, 2017
Step #2 in making htlcManager (aka channelLink) testable: Implement the ChannelLink interface which is needed to use it in pair with htlc switch. With this commit channel link impelements interface, but isn't able to operate properly yet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.