Skip to content

Commit 0735522

Browse files
committed
multi: fix make fmt
1 parent 3851f28 commit 0735522

File tree

77 files changed

+707
-648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+707
-648
lines changed

amp/child.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ func (c *Child) String() string {
6060
// DeriveChild computes the child preimage and child hash for a given (root,
6161
// share, index) tuple. The derivation is defined as:
6262
//
63-
// child_preimage = SHA256(root || share || be32(index)),
64-
// child_hash = SHA256(child_preimage).
63+
// child_preimage = SHA256(root || share || be32(index)),
64+
// child_hash = SHA256(child_preimage).
6565
func DeriveChild(root Share, desc ChildDesc) *Child {
6666
var (
6767
indexBytes [4]byte

amp/sharer.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,14 @@ func ReconstructChildren(descs ...ChildDesc) []*Child {
165165

166166
// split splits a share into two random values, that when XOR'd reproduce the
167167
// original share. Given a share s, the two shares are derived as:
168-
// left <-$- random
169-
// right = parent ^ left.
168+
//
169+
// left <-$- random
170+
// right = parent ^ left.
170171
//
171172
// When reconstructed, we have that:
172-
// left ^ right = left ^ parent ^ left
173-
// = parent.
173+
//
174+
// left ^ right = left ^ parent ^ left
175+
// = parent.
174176
func split(parent *Share) (Share, Share, error) {
175177
// Generate a random share for the left child.
176178
var left Share

brontide/noise.go

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -346,19 +346,21 @@ func EphemeralGenerator(gen func() (*btcec.PrivateKey, error)) func(*Machine) {
346346
// itself.
347347
//
348348
// The acts proceeds the following order (initiator on the left):
349-
// GenActOne() ->
350-
// RecvActOne()
351-
// <- GenActTwo()
352-
// RecvActTwo()
353-
// GenActThree() ->
354-
// RecvActThree()
349+
//
350+
// GenActOne() ->
351+
// RecvActOne()
352+
// <- GenActTwo()
353+
// RecvActTwo()
354+
// GenActThree() ->
355+
// RecvActThree()
355356
//
356357
// This exchange corresponds to the following Noise handshake:
357-
// <- s
358-
// ...
359-
// -> e, es
360-
// <- e, ee
361-
// -> s, se
358+
//
359+
// <- s
360+
// ...
361+
// -> e, es
362+
// <- e, ee
363+
// -> s, se
362364
type Machine struct {
363365
sendCipher cipherState
364366
recvCipher cipherState
@@ -445,7 +447,7 @@ const (
445447
// and the responder's static key. Future payloads are encrypted with a key
446448
// derived from this result.
447449
//
448-
// -> e, es
450+
// -> e, es
449451
func (b *Machine) GenActOne() ([ActOneSize]byte, error) {
450452
var actOne [ActOneSize]byte
451453

@@ -524,7 +526,7 @@ func (b *Machine) RecvActOne(actOne [ActOneSize]byte) error {
524526
// act one, but then results in a different ECDH operation between the
525527
// initiator's and responder's ephemeral keys.
526528
//
527-
// <- e, ee
529+
// <- e, ee
528530
func (b *Machine) GenActTwo() ([ActTwoSize]byte, error) {
529531
var actTwo [ActTwoSize]byte
530532

@@ -601,7 +603,7 @@ func (b *Machine) RecvActTwo(actTwo [ActTwoSize]byte) error {
601603
// the responder. This act also includes the final ECDH operation which yields
602604
// the final session.
603605
//
604-
// -> s, se
606+
// -> s, se
605607
func (b *Machine) GenActThree() ([ActThreeSize]byte, error) {
606608
var actThree [ActThreeSize]byte
607609

chainntnfs/neutrinonotify/neutrino.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
// running full node.
3838
//
3939
// TODO(roasbeef): heavily consolidate with NeutrinoNotifier code
40-
// * maybe combine into single package?
40+
// - maybe combine into single package?
4141
type NeutrinoNotifier struct {
4242
epochClientCounter uint64 // To be used atomically.
4343

chainntnfs/txnotifier.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,11 +1405,11 @@ func (n *TxNotifier) dispatchSpendDetails(ntfn *SpendNtfn, details *SpendDetail)
14051405
// through every transaction and determine if it is relevant to any of its
14061406
// clients. A transaction can be relevant in either of the following two ways:
14071407
//
1408-
// 1. One of the inputs in the transaction spends an outpoint/output script
1409-
// for which we currently have an active spend registration for.
1408+
// 1. One of the inputs in the transaction spends an outpoint/output script
1409+
// for which we currently have an active spend registration for.
14101410
//
1411-
// 2. The transaction has a txid or output script for which we currently have
1412-
// an active confirmation registration for.
1411+
// 2. The transaction has a txid or output script for which we currently have
1412+
// an active confirmation registration for.
14131413
//
14141414
// In the event that the transaction is relevant, a confirmation/spend
14151415
// notification will be queued for dispatch to the relevant clients.

chainreg/no_chain_backend.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ var (
4040
)
4141

4242
// NoChainBackend is a mock implementation of the following interfaces:
43-
// - chainview.FilteredChainView
44-
// - chainntnfs.ChainNotifier
45-
// - chainfee.Estimator
43+
// - chainview.FilteredChainView
44+
// - chainntnfs.ChainNotifier
45+
// - chainfee.Estimator
4646
type NoChainBackend struct {
4747
}
4848

channeldb/channel.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,11 +1315,11 @@ func (c *OpenChannel) SecondCommitmentPoint() (*btcec.PublicKey, error) {
13151315
// commitment chains in the case of a last or only partially processed message.
13161316
// When the remote party receives this message one of three things may happen:
13171317
//
1318-
// 1. We're fully synced and no messages need to be sent.
1319-
// 2. We didn't get the last CommitSig message they sent, so they'll re-send
1320-
// it.
1321-
// 3. We didn't get the last RevokeAndAck message they sent, so they'll
1322-
// re-send it.
1318+
// 1. We're fully synced and no messages need to be sent.
1319+
// 2. We didn't get the last CommitSig message they sent, so they'll re-send
1320+
// it.
1321+
// 3. We didn't get the last RevokeAndAck message they sent, so they'll
1322+
// re-send it.
13231323
//
13241324
// If this is a restored channel, having status ChanStatusRestored, then we'll
13251325
// modify our typical chan sync message to ensure they force close even if

channeldb/forwarding_package_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ func checkPkgFilterRand(t *testing.T, b, p uint16) {
110110
}
111111

112112
// checkPkgFilterEncodeDecode tests the serialization of a pkg filter by:
113-
// 1) writing it to a buffer
114-
// 2) verifying the number of bytes written matches the filter's Size()
115-
// 3) reconstructing the filter decoding the bytes
116-
// 4) checking that the two filters are the same according to Equal
113+
// 1. writing it to a buffer
114+
// 2. verifying the number of bytes written matches the filter's Size()
115+
// 3. reconstructing the filter decoding the bytes
116+
// 4. checking that the two filters are the same according to Equal
117117
func checkPkgFilterEncodeDecode(t *testing.T, i uint16, f *channeldb.PkgFilter) {
118118
var b bytes.Buffer
119119
if err := f.Encode(&b); err != nil {

channeldb/migration/lnwire21/node_announcement.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ func (a *NodeAnnouncement) Decode(r io.Reader, pver uint32) error {
140140

141141
// Encode serializes the target NodeAnnouncement into the passed io.Writer
142142
// observing the protocol version specified.
143-
//
144143
func (a *NodeAnnouncement) Encode(w io.Writer, pver uint32) error {
145144
return WriteElements(w,
146145
a.Signature,

channeldb/migration25/migration_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"github.com/btcsuite/btcd/btcutil"
1010
"github.com/btcsuite/btcd/chaincfg/chainhash"
1111
"github.com/btcsuite/btcd/wire"
12-
1312
lnwire "github.com/lightningnetwork/lnd/channeldb/migration/lnwire21"
1413
mig24 "github.com/lightningnetwork/lnd/channeldb/migration24"
1514
mig "github.com/lightningnetwork/lnd/channeldb/migration_01_to_11"

0 commit comments

Comments
 (0)