From 663c3962356c41731497894b2f8b4531858992b1 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 18 Apr 2018 04:02:04 +0200 Subject: [PATCH] multi: fix a-vs-an typos --- autopilot/graph.go | 4 ++-- autopilot/prefattach.go | 2 +- brontide/conn.go | 4 ++-- brontide/noise.go | 2 +- chainntnfs/interface_test.go | 2 +- chainntnfs/neutrinonotify/neutrino.go | 2 +- channeldb/channel.go | 2 +- channeldb/graph.go | 6 +++--- channeldb/graph_test.go | 2 +- channeldb/invoices.go | 2 +- channeldb/nodes.go | 2 +- contractcourt/briefcase.go | 4 ++-- contractcourt/chain_arbitrator.go | 2 +- contractcourt/chain_watcher.go | 2 +- discovery/gossiper.go | 4 ++-- htlcswitch/queue.go | 2 +- htlcswitch/switch.go | 4 ++-- htlcswitch/test_utils.go | 2 +- lnd_test.go | 8 ++++---- lnrpc/rpc.proto | 2 +- lnrpc/rpc.swagger.json | 2 +- lntest/node.go | 2 +- lnwallet/btcwallet/btcwallet.go | 4 ++-- lnwallet/channel.go | 6 +++--- lnwallet/channel_test.go | 4 ++-- lnwallet/interface.go | 4 ++-- lnwallet/script_utils.go | 6 +++--- lnwire/accept_channel.go | 4 ++-- lnwire/commit_sig.go | 2 +- lnwire/error.go | 2 +- lnwire/init_message.go | 2 +- lnwire/open_channel.go | 2 +- lnwire/update_add_htlc.go | 2 +- lnwire/update_fail_htlc.go | 2 +- lnwire/update_fee.go | 2 +- lnwire/update_fulfill_htlc.go | 2 +- nursery_store.go | 2 +- peer.go | 2 +- routing/chainview/interface.go | 2 +- routing/chainview/neutrino.go | 4 ++-- routing/errors.go | 4 ++-- routing/router.go | 2 +- routing/validation_barrier.go | 2 +- rpcserver.go | 2 +- utxonursery.go | 6 +++--- 45 files changed, 67 insertions(+), 67 deletions(-) diff --git a/autopilot/graph.go b/autopilot/graph.go index 5ef1db48..a7dc0c45 100644 --- a/autopilot/graph.go +++ b/autopilot/graph.go @@ -37,7 +37,7 @@ type databaseChannelGraph struct { // autopilot.ChannelGraph interface. var _ ChannelGraph = (*databaseChannelGraph)(nil) -// ChannelGraphFromDatabase returns a instance of the autopilot.ChannelGraph +// ChannelGraphFromDatabase returns an instance of the autopilot.ChannelGraph // backed by a live, open channeldb instance. func ChannelGraphFromDatabase(db *channeldb.ChannelGraph) ChannelGraph { return &databaseChannelGraph{ @@ -260,7 +260,7 @@ func (d *databaseChannelGraph) addRandChannel(node1, node2 *btcec.PublicKey, nil } -// memChannelGraph is a implementation of the autopilot.ChannelGraph backed by +// memChannelGraph is an implementation of the autopilot.ChannelGraph backed by // an in-memory graph. type memChannelGraph struct { graph map[NodeID]memNode diff --git a/autopilot/prefattach.go b/autopilot/prefattach.go index 53200d2c..7e8da3c4 100644 --- a/autopilot/prefattach.go +++ b/autopilot/prefattach.go @@ -101,7 +101,7 @@ func (p *ConstrainedPrefAttachment) NeedMoreChans(channels []Channel, return fundsAvailable, numAdditionalChans, true } -// NodeID is a simple type that holds a EC public key serialized in compressed +// NodeID is a simple type that holds an EC public key serialized in compressed // format. type NodeID [33]byte diff --git a/brontide/conn.go b/brontide/conn.go index cee04f4c..d7030a33 100644 --- a/brontide/conn.go +++ b/brontide/conn.go @@ -104,7 +104,7 @@ func (c *Conn) ReadNextMessage() ([]byte, error) { } // Read reads data from the connection. Read can be made to time out and -// return a Error with Timeout() == true after a fixed time limit; see +// return an Error with Timeout() == true after a fixed time limit; see // SetDeadline and SetReadDeadline. // // Part of the net.Conn interface. @@ -129,7 +129,7 @@ func (c *Conn) Read(b []byte) (n int, err error) { } // Write writes data to the connection. Write can be made to time out and -// return a Error with Timeout() == true after a fixed time limit; see +// return an Error with Timeout() == true after a fixed time limit; see // SetDeadline and SetWriteDeadline. // // Part of the net.Conn interface. diff --git a/brontide/noise.go b/brontide/noise.go index b4f91af3..3321d32a 100644 --- a/brontide/noise.go +++ b/brontide/noise.go @@ -464,7 +464,7 @@ func (b *Machine) GenActOne() ([ActOneSize]byte, error) { // RecvActOne processes the act one packet sent by the initiator. The responder // executes the mirrored actions to that of the initiator extending the -// handshake digest and deriving a new shared secret based on a ECDH with the +// handshake digest and deriving a new shared secret based on an ECDH with the // initiator's ephemeral key and responder's static key. func (b *Machine) RecvActOne(actOne [ActOneSize]byte) error { var ( diff --git a/chainntnfs/interface_test.go b/chainntnfs/interface_test.go index c01630af..faea4123 100644 --- a/chainntnfs/interface_test.go +++ b/chainntnfs/interface_test.go @@ -369,7 +369,7 @@ func testSpendNotification(miner *rpctest.Harness, t.Fatalf("unable to get current height: %v", err) } - // Now that we have a output index and the pkScript, register for a + // Now that we have an output index and the pkScript, register for a // spentness notification for the newly created output with multiple // clients in order to ensure the implementation can support // multi-client spend notifications. diff --git a/chainntnfs/neutrinonotify/neutrino.go b/chainntnfs/neutrinonotify/neutrino.go index 231196fb..15ad37ab 100644 --- a/chainntnfs/neutrinonotify/neutrino.go +++ b/chainntnfs/neutrinonotify/neutrino.go @@ -129,7 +129,7 @@ func (n *NeutrinoNotifier) Start() error { n.bestHeight = bestHeight // Next, we'll create our set of rescan options. Currently it's - // required that a user MUST set a addr/outpoint/txid when creating a + // required that a user MUST set an addr/outpoint/txid when creating a // rescan. To get around this, we'll add a "zero" outpoint, that won't // actually be matched. var zeroHash chainhash.Hash diff --git a/channeldb/channel.go b/channeldb/channel.go index 764db9a7..655ea3c1 100644 --- a/channeldb/channel.go +++ b/channeldb/channel.go @@ -660,7 +660,7 @@ func fetchOpenChannel(chanBucket *bolt.Bucket, // channels in the database globally, or according to the LinkNode they were // created with. // -// TODO(roasbeef): addr param should eventually be a lnwire.NetAddress type +// TODO(roasbeef): addr param should eventually be an lnwire.NetAddress type // that includes service bits. func (c *OpenChannel) SyncPending(addr net.Addr, pendingHeight uint32) error { c.Lock() diff --git a/channeldb/graph.go b/channeldb/graph.go index 81722513..842443ea 100644 --- a/channeldb/graph.go +++ b/channeldb/graph.go @@ -65,8 +65,8 @@ var ( // in the bucket, grouping them according to their in/out nodes. // Additionally, the items in this bucket also contain the complete // edge information for a channel. The edge information includes the - // capacity of the channel, the nodes that made the channel, etc. This - // bucket resides within the edgeBucket above. Creation of a edge + // capacity of the channel, the nodes that made the channel, etc. This + // bucket resides within the edgeBucket above. Creation of an edge // proceeds in two phases: first the edge is added to the edge index, // afterwards the edgeBucket can be updated with the latest details of // the edge as they are announced on the network. @@ -1244,7 +1244,7 @@ func (l *LightningNode) ForEachChannel(tx *bolt.Tx, // ChannelEdgeInfo represents a fully authenticated channel along with all its // unique attributes. Once an authenticated channel announcement has been -// processed on the network, then a instance of ChannelEdgeInfo encapsulating +// processed on the network, then an instance of ChannelEdgeInfo encapsulating // the channels attributes is stored. The other portions relevant to routing // policy of a channel are stored within a ChannelEdgePolicy for each direction // of the channel. diff --git a/channeldb/graph_test.go b/channeldb/graph_test.go index 850ae119..37a8e0a5 100644 --- a/channeldb/graph_test.go +++ b/channeldb/graph_test.go @@ -482,7 +482,7 @@ func TestDisconnectBlockAtHeight(t *testing.T) { } // Call DisconnectBlockAtHeight, which should prune every channel - // that has an funding height of 'height' or greater. + // that has a funding height of 'height' or greater. removed, err := graph.DisconnectBlockAtHeight(uint32(height)) if err != nil { t.Fatalf("unable to prune %v", err) diff --git a/channeldb/invoices.go b/channeldb/invoices.go index cbdca215..8d2c585f 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -45,7 +45,7 @@ const ( // within the database along side incoming/outgoing invoices. MaxReceiptSize = 1024 - // MaxPaymentRequestSize is the max size of a a payment request for + // MaxPaymentRequestSize is the max size of a payment request for // this invoice. // TODO(halseth): determine the max length payment request when field // lengths are final. diff --git a/channeldb/nodes.go b/channeldb/nodes.go index 8407070e..10fe69b5 100644 --- a/channeldb/nodes.go +++ b/channeldb/nodes.go @@ -147,7 +147,7 @@ func (db *DB) FetchLinkNode(identity *btcec.PublicKey) (*LinkNode, error) { } // If a link node for that particular public key cannot be - // located, then exit early with a ErrNodeNotFound. + // located, then exit early with an ErrNodeNotFound. pubKey := identity.SerializeCompressed() nodeBytes := nodeMetaBucket.Get(pubKey) if nodeBytes == nil { diff --git a/contractcourt/briefcase.go b/contractcourt/briefcase.go index 7a98a0cb..e9c8acc3 100644 --- a/contractcourt/briefcase.go +++ b/contractcourt/briefcase.go @@ -98,7 +98,7 @@ type ArbitratorLog interface { WipeHistory() error } -// ArbitratorState is a enum that details the current state of the +// ArbitratorState is an enum that details the current state of the // ChannelArbitrator's state machine. type ArbitratorState uint8 @@ -166,7 +166,7 @@ type resolverType uint8 const ( // resolverTimeout is the type of a resolver that's tasked with - // resolving a outgoing HTLC that is very close to timing out. + // resolving an outgoing HTLC that is very close to timing out. resolverTimeout = 0 // resolverSuccess is the type of a resolver that's tasked with diff --git a/contractcourt/chain_arbitrator.go b/contractcourt/chain_arbitrator.go index a5c621bc..82ab1add 100644 --- a/contractcourt/chain_arbitrator.go +++ b/contractcourt/chain_arbitrator.go @@ -86,7 +86,7 @@ type ChainArbitratorConfig struct { // returned. IsOurAddress func(btcutil.Address) bool - // IncubateOutput sends either a incoming HTLC, an outgoing HTLC, or + // IncubateOutput sends either an incoming HTLC, an outgoing HTLC, or // both to the utxo nursery. Once this function returns, the nursery // should have safely persisted the outputs to disk, and should start // the process of incubation. This is used when a resolver wishes to diff --git a/contractcourt/chain_watcher.go b/contractcourt/chain_watcher.go index 6ee05962..b3dfd929 100644 --- a/contractcourt/chain_watcher.go +++ b/contractcourt/chain_watcher.go @@ -207,7 +207,7 @@ func (c *chainWatcher) Stop() error { return nil } -// SubscribeChannelEvents returns a n active subscription to the set of channel +// SubscribeChannelEvents returns an active subscription to the set of channel // events for the channel watched by this chain watcher. Once clients no longer // require the subscription, they should call the Cancel() method to allow the // watcher to regain those committed resources. The syncDispatch bool indicates diff --git a/discovery/gossiper.go b/discovery/gossiper.go index 9801062e..a2e8ec9c 100644 --- a/discovery/gossiper.go +++ b/discovery/gossiper.go @@ -148,7 +148,7 @@ type AuthenticatedGossiper struct { newBlocks <-chan *chainntnfs.BlockEpoch // prematureAnnouncements maps a block height to a set of network - // messages which are "premature" from our PoV. An message is premature + // messages which are "premature" from our PoV. A message is premature // if it claims to be anchored in a block which is beyond the current // main chain tip as we know it. Premature network messages will be // processed once the chain tip as we know it extends to/past the @@ -168,7 +168,7 @@ type AuthenticatedGossiper struct { // announcement messages. We use it to buffer half of the material // needed to reconstruct a full authenticated channel announcement. // Once we receive the other half the channel proof, we'll be able to - // properly validate it an re-broadcast it out to the network. + // properly validate it and re-broadcast it out to the network. waitingProofs *channeldb.WaitingProofStore // networkMsgs is a channel that carries new network broadcasted diff --git a/htlcswitch/queue.go b/htlcswitch/queue.go index 0e80b0ce..e2930852 100644 --- a/htlcswitch/queue.go +++ b/htlcswitch/queue.go @@ -7,7 +7,7 @@ import ( "github.com/lightningnetwork/lnd/lnwire" ) -// packetQueue is an goroutine-safe queue of htlc packets which over flow the +// packetQueue is a goroutine-safe queue of htlc packets which over flow the // current commitment transaction. An HTLC will overflow the current commitment // transaction if one attempts to add a new HTLC to the state machine which // already has the max number of pending HTLC's present on the commitment diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index e530c73e..6fecb71a 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -52,7 +52,7 @@ type pendingPayment struct { response chan *htlcPacket err chan error - // deobfuscator is an serializable entity which is used if we received + // deobfuscator is a serializable entity which is used if we received // an error, it deobfuscates the onion failure blob, and extracts the // exact error from it. deobfuscator ErrorDecrypter @@ -65,7 +65,7 @@ type plexPacket struct { err chan error } -// ChannelCloseType is a enum which signals the type of channel closure the +// ChannelCloseType is an enum which signals the type of channel closure the // peer should execute. type ChannelCloseType uint8 diff --git a/htlcswitch/test_utils.go b/htlcswitch/test_utils.go index ec9ce9ad..cf09a9f5 100644 --- a/htlcswitch/test_utils.go +++ b/htlcswitch/test_utils.go @@ -591,7 +591,7 @@ type threeHopNetwork struct { } // generateHops creates the per hop payload, the total amount to be sent, and -// also the time lock value needed to route a HTLC with the target amount over +// also the time lock value needed to route an HTLC with the target amount over // the specified path. func generateHops(payAmt lnwire.MilliSatoshi, startingHeight uint32, path ...*channelLink) (lnwire.MilliSatoshi, uint32, []ForwardingInfo) { diff --git a/lnd_test.go b/lnd_test.go index fed4dc02..65bced83 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -1784,7 +1784,7 @@ func testChannelForceClosure(net *lntest.NetworkHarness, t *harnessTest) { time.Sleep(duration) // We now restart Alice, to ensure that she will broadcast the presigned - // htlc timeout txns after the delay expires after experiencing an while + // htlc timeout txns after the delay expires after experiencing a while // waiting for the htlc outputs to incubate. if err := net.RestartNode(net.Alice, nil); err != nil { t.Fatalf("Node restart failed: %v", err) @@ -4991,7 +4991,7 @@ func testAsyncPayments(net *lntest.NetworkHarness, t *harnessTest) { // Initialize seed random in order to generate invoices. prand.Seed(time.Now().UnixNano()) - // With the channel open, we'll create a invoices for Bob that Alice + // With the channel open, we'll create invoices for Bob that Alice // will pay to in order to advance the state of the channel. bobPayReqs := make([]string, numInvoices) for i := 0; i < numInvoices; i++ { @@ -5169,7 +5169,7 @@ func testBidirectionalAsyncPayments(net *lntest.NetworkHarness, t *harnessTest) // Initialize seed random in order to generate invoices. prand.Seed(time.Now().UnixNano()) - // With the channel open, we'll create a invoices for Bob that Alice + // With the channel open, we'll create invoices for Bob that Alice // will pay to in order to advance the state of the channel. bobPayReqs := make([]string, numInvoices) for i := 0; i < numInvoices; i++ { @@ -5192,7 +5192,7 @@ func testBidirectionalAsyncPayments(net *lntest.NetworkHarness, t *harnessTest) bobPayReqs[i] = resp.PaymentRequest } - // With the channel open, we'll create a invoices for Alice that Bob + // With the channel open, we'll create invoices for Alice that Bob // will pay to in order to advance the state of the channel. alicePayReqs := make([]string, numInvoices) for i := 0; i < numInvoices; i++ { diff --git a/lnrpc/rpc.proto b/lnrpc/rpc.proto index 10635db2..4085b9a1 100644 --- a/lnrpc/rpc.proto +++ b/lnrpc/rpc.proto @@ -1247,7 +1247,7 @@ message RoutingPolicy { /** A fully authenticated channel along with all its unique attributes. Once an authenticated channel announcement has been processed on the network, -then a instance of ChannelEdgeInfo encapsulating the channels attributes is +then an instance of ChannelEdgeInfo encapsulating the channels attributes is stored. The other portions relevant to routing policy of a channel are stored within a ChannelEdgePolicy for each direction of the channel. */ diff --git a/lnrpc/rpc.swagger.json b/lnrpc/rpc.swagger.json index e9294933..5c0c38f1 100644 --- a/lnrpc/rpc.swagger.json +++ b/lnrpc/rpc.swagger.json @@ -1056,7 +1056,7 @@ "$ref": "#/definitions/lnrpcRoutingPolicy" } }, - "description": "*\nA fully authenticated channel along with all its unique attributes.\nOnce an authenticated channel announcement has been processed on the network,\nthen a instance of ChannelEdgeInfo encapsulating the channels attributes is\nstored. The other portions relevant to routing policy of a channel are stored\nwithin a ChannelEdgePolicy for each direction of the channel." + "description": "*\nA fully authenticated channel along with all its unique attributes.\nOnce an authenticated channel announcement has been processed on the network,\nthen an instance of ChannelEdgeInfo encapsulating the channels attributes is\nstored. The other portions relevant to routing policy of a channel are stored\nwithin a ChannelEdgePolicy for each direction of the channel." }, "lnrpcChannelEdgeUpdate": { "type": "object", diff --git a/lntest/node.go b/lntest/node.go index 502ae52f..c41897e2 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -602,7 +602,7 @@ func (hn *HarnessNode) lightningNetworkWatcher() { // TODO(roasbeef): add update type also, checks for // multiple of 2 if watchRequest.chanOpen { - // If this is a open request, then it can be + // If this is an open request, then it can be // dispatched if the number of edges seen for // the channel is at least two. if numEdges := openChans[targetChan]; numEdges >= 2 { diff --git a/lnwallet/btcwallet/btcwallet.go b/lnwallet/btcwallet/btcwallet.go index 6a2247e3..69cbd9c0 100644 --- a/lnwallet/btcwallet/btcwallet.go +++ b/lnwallet/btcwallet/btcwallet.go @@ -283,7 +283,7 @@ func (b *BtcWallet) LockOutpoint(o wire.OutPoint) { b.wallet.LockOutpoint(o) } -// UnlockOutpoint unlocks an previously locked output, marking it eligible for +// UnlockOutpoint unlocks a previously locked output, marking it eligible for // coin selection. // // This is a part of the WalletController interface. @@ -515,7 +515,7 @@ func minedTransactionsToDetails( } // unminedTransactionsToDetail is a helper function which converts a summary -// for a unconfirmed transaction to a transaction detail. +// for an unconfirmed transaction to a transaction detail. func unminedTransactionsToDetail( summary base.TransactionSummary, ) (*lnwallet.TransactionDetail, error) { diff --git a/lnwallet/channel.go b/lnwallet/channel.go index 28367dfa..d3049735 100644 --- a/lnwallet/channel.go +++ b/lnwallet/channel.go @@ -2556,8 +2556,8 @@ func genRemoteHtlcSigJobs(keyRing *CommitmentKeyRing, feePerKw := remoteCommitView.feePerKw // With the keys generated, we'll make a slice with enough capacity to - // hold potentially all the HTLC's. The actual slice may be a bit - // smaller (than its total capacity) an some HTLC's may be dust. + // hold potentially all the HTLCs. The actual slice may be a bit + // smaller (than its total capacity) and some HTLCs may be dust. numSigs := (len(remoteCommitView.incomingHTLCs) + len(remoteCommitView.outgoingHTLCs)) sigBatch := make([]signJob, 0, numSigs) @@ -2565,7 +2565,7 @@ func genRemoteHtlcSigJobs(keyRing *CommitmentKeyRing, var err error cancelChan := make(chan struct{}) - // For ech outgoing and incoming HTLC, if the HTLC isn't considered a + // For each outgoing and incoming HTLC, if the HTLC isn't considered a // dust output after taking into account second-level HTLC fees, then a // sigJob will be generated and appended to the current batch. for _, htlc := range remoteCommitView.incomingHTLCs { diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index 70da04fc..a0b7ec9c 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -3026,7 +3026,7 @@ func TestChanSyncOweCommitment(t *testing.T) { for i := 0; i < 3; i++ { settleMsg, ok := aliceMsgsToSend[i].(*lnwire.UpdateFulfillHTLC) if !ok { - t.Fatalf("expected a htlc settle message, "+ + t.Fatalf("expected an HTLC settle message, "+ "instead have %v", spew.Sdump(settleMsg)) } if settleMsg.ID != uint64(i) { @@ -3045,7 +3045,7 @@ func TestChanSyncOweCommitment(t *testing.T) { // The HTLC add message should be identical. if _, ok := aliceMsgsToSend[3].(*lnwire.UpdateAddHTLC); !ok { - t.Fatalf("expected a htlc add message, instead have %v", + t.Fatalf("expected an HTLC add message, instead have %v", spew.Sdump(aliceMsgsToSend[3])) } if !reflect.DeepEqual(aliceHtlc, aliceMsgsToSend[3]) { diff --git a/lnwallet/interface.go b/lnwallet/interface.go index e5ad9bb8..2f803d29 100644 --- a/lnwallet/interface.go +++ b/lnwallet/interface.go @@ -15,7 +15,7 @@ import ( // to spend a specified output. var ErrNotMine = errors.New("the passed output doesn't belong to the wallet") -// AddressType is a enum-like type which denotes the possible address types +// AddressType is an enum-like type which denotes the possible address types // WalletController supports. type AddressType uint8 @@ -169,7 +169,7 @@ type WalletController interface { // usage when funding a channel. LockOutpoint(o wire.OutPoint) - // UnlockOutpoint unlocks an previously locked output, marking it + // UnlockOutpoint unlocks a previously locked output, marking it // eligible for coin selection. UnlockOutpoint(o wire.OutPoint) diff --git a/lnwallet/script_utils.go b/lnwallet/script_utils.go index a7c3c4c5..6399b17e 100644 --- a/lnwallet/script_utils.go +++ b/lnwallet/script_utils.go @@ -726,7 +726,7 @@ func createHtlcSuccessTx(htlcOutput wire.OutPoint, htlcAmt btcutil.Amount, // secondLevelHtlcScript is the uniform script that's used as the output for // the second-level HTLC transactions. The second level transaction act as a -// sort of covenant, ensuring that an 2-of-2 multi-sig output can only be +// sort of covenant, ensuring that a 2-of-2 multi-sig output can only be // spent in a particular way, and to a particular output. // // Possible Input Scripts: @@ -809,7 +809,7 @@ func htlcSpendSuccess(signer Signer, signDesc *SignDescriptor, // this instance. signDesc.SigHashes = txscript.NewTxSigHashes(sweepTx) - // With the proper sequence an version set, we'll now sign the timeout + // With the proper sequence and version set, we'll now sign the timeout // transaction using the passed signed descriptor. In order to generate // a valid signature, then signDesc should be using the base delay // public key, and the proper single tweak bytes. @@ -865,7 +865,7 @@ func htlcSpendRevoke(signer Signer, signDesc *SignDescriptor, func HtlcSecondLevelSpend(signer Signer, signDesc *SignDescriptor, sweepTx *wire.MsgTx) (wire.TxWitness, error) { - // With the proper sequence an version set, we'll now sign the timeout + // With the proper sequence and version set, we'll now sign the timeout // transaction using the passed signed descriptor. In order to generate // a valid signature, then signDesc should be using the base delay // public key, and the proper single tweak bytes. diff --git a/lnwire/accept_channel.go b/lnwire/accept_channel.go index 7248494c..88b955bb 100644 --- a/lnwire/accept_channel.go +++ b/lnwire/accept_channel.go @@ -8,7 +8,7 @@ import ( ) // AcceptChannel is the message Bob sends to Alice after she initiates the -// single funder channel workflow via a AcceptChannel message. Once Alice +// single funder channel workflow via an AcceptChannel message. Once Alice // receives Bob's response, then she has all the items necessary to construct // the funding transaction, and both commitment transactions. type AcceptChannel struct { @@ -141,7 +141,7 @@ func (a *AcceptChannel) Decode(r io.Reader, pver uint32) error { } // MsgType returns the MessageType code which uniquely identifies this message -// as a AcceptChannel on the wire. +// as an AcceptChannel on the wire. // // This is part of the lnwire.Message interface. func (a *AcceptChannel) MsgType() MessageType { diff --git a/lnwire/commit_sig.go b/lnwire/commit_sig.go index a66a0dae..9a3e8d06 100644 --- a/lnwire/commit_sig.go +++ b/lnwire/commit_sig.go @@ -28,7 +28,7 @@ type CommitSig struct { // created commitment. The order of the signatures is expected to be // identical to the placement of the HTLC's within the BIP 69 sorted // commitment transaction. For each outgoing HTLC (from the PoV of the - // sender of this message), a signature for a HTLC timeout transaction + // sender of this message), a signature for an HTLC timeout transaction // should be signed, for each incoming HTLC the HTLC timeout // transaction should be signed. HtlcSigs []Sig diff --git a/lnwire/error.go b/lnwire/error.go index 9f47bfef..2f1afed3 100644 --- a/lnwire/error.go +++ b/lnwire/error.go @@ -117,7 +117,7 @@ func (c *Error) MsgType() MessageType { return MsgError } -// MaxPayloadLength returns the maximum allowed payload size for a Error +// MaxPayloadLength returns the maximum allowed payload size for an Error // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/lnwire/init_message.go b/lnwire/init_message.go index df9554a0..af2bc9be 100644 --- a/lnwire/init_message.go +++ b/lnwire/init_message.go @@ -58,7 +58,7 @@ func (msg *Init) MsgType() MessageType { return MsgInit } -// MaxPayloadLength returns the maximum allowed payload size for a Init +// MaxPayloadLength returns the maximum allowed payload size for an Init // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/lnwire/open_channel.go b/lnwire/open_channel.go index 35d80038..69b1d84a 100644 --- a/lnwire/open_channel.go +++ b/lnwire/open_channel.go @@ -185,7 +185,7 @@ func (o *OpenChannel) Decode(r io.Reader, pver uint32) error { } // MsgType returns the MessageType code which uniquely identifies this message -// as a OpenChannel on the wire. +// as an OpenChannel on the wire. // // This is part of the lnwire.Message interface. func (o *OpenChannel) MsgType() MessageType { diff --git a/lnwire/update_add_htlc.go b/lnwire/update_add_htlc.go index 8f1bbd60..300ad4c6 100644 --- a/lnwire/update_add_htlc.go +++ b/lnwire/update_add_htlc.go @@ -99,7 +99,7 @@ func (c *UpdateAddHTLC) MsgType() MessageType { return MsgUpdateAddHTLC } -// MaxPayloadLength returns the maximum allowed payload size for a UpdateAddHTLC +// MaxPayloadLength returns the maximum allowed payload size for an UpdateAddHTLC // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/lnwire/update_fail_htlc.go b/lnwire/update_fail_htlc.go index 562199b5..dfc2fd2d 100644 --- a/lnwire/update_fail_htlc.go +++ b/lnwire/update_fail_htlc.go @@ -62,7 +62,7 @@ func (c *UpdateFailHTLC) MsgType() MessageType { return MsgUpdateFailHTLC } -// MaxPayloadLength returns the maximum allowed payload size for a UpdateFailHTLC +// MaxPayloadLength returns the maximum allowed payload size for an UpdateFailHTLC // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/lnwire/update_fee.go b/lnwire/update_fee.go index 255028dc..031796a7 100644 --- a/lnwire/update_fee.go +++ b/lnwire/update_fee.go @@ -60,7 +60,7 @@ func (c *UpdateFee) MsgType() MessageType { return MsgUpdateFee } -// MaxPayloadLength returns the maximum allowed payload size for a UpdateFee +// MaxPayloadLength returns the maximum allowed payload size for an UpdateFee // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/lnwire/update_fulfill_htlc.go b/lnwire/update_fulfill_htlc.go index 3285cead..aa145112 100644 --- a/lnwire/update_fulfill_htlc.go +++ b/lnwire/update_fulfill_htlc.go @@ -68,7 +68,7 @@ func (c *UpdateFulfillHTLC) MsgType() MessageType { return MsgUpdateFulfillHTLC } -// MaxPayloadLength returns the maximum allowed payload size for a UpdateFulfillHTLC +// MaxPayloadLength returns the maximum allowed payload size for an UpdateFulfillHTLC // complete message observing the specified protocol version. // // This is part of the lnwire.Message interface. diff --git a/nursery_store.go b/nursery_store.go index 6298a8d2..0b42a49c 100644 --- a/nursery_store.go +++ b/nursery_store.go @@ -1041,7 +1041,7 @@ func (ns *nurseryStore) enterPreschool(tx *bolt.Tx, kid *kidOutput) error { return err } - // We'll first check if a entry for this key is already stored. If so, + // We'll first check if an entry for this key is already stored. If so, // then we'll ignore this request, and return a nil error. if rawBytes := chanBucket.Get(pfxOutputKey); rawBytes != nil { return nil diff --git a/peer.go b/peer.go index 0f9cab71..dfa4e0f7 100644 --- a/peer.go +++ b/peer.go @@ -53,7 +53,7 @@ type outgoingMsg struct { errChan chan error // MUST be buffered. } -// newChannelMsg packages a lnwallet.LightningChannel with a channel that +// newChannelMsg packages an lnwallet.LightningChannel with a channel that // allows the receiver of the request to report when the funding transaction // has been confirmed and the channel creation process completed. type newChannelMsg struct { diff --git a/routing/chainview/interface.go b/routing/chainview/interface.go index 8c626773..882d17b1 100644 --- a/routing/chainview/interface.go +++ b/routing/chainview/interface.go @@ -19,7 +19,7 @@ type FilteredChainView interface { // sent over. Each time a block is connected to the end of a main // chain, and appropriate FilteredBlock which contains the transactions // which mutate our watched UTXO set is to be returned. In case of a - // UpdateFilter call with a updateHeight lower than the current best + // UpdateFilter call with an updateHeight lower than the current best // height, blocks with the updated filter will be resent, and must be // handled by the receiver as an update to an already known block, NOT // as a new block being connected to the chain. diff --git a/routing/chainview/neutrino.go b/routing/chainview/neutrino.go index 93829342..e464f2b1 100644 --- a/routing/chainview/neutrino.go +++ b/routing/chainview/neutrino.go @@ -55,7 +55,7 @@ var _ FilteredChainView = (*CfFilteredChainView)(nil) // NewCfFilteredChainView creates a new instance of the CfFilteredChainView // which is connected to an active neutrino node. // -// NOTE: The node should already be running an syncing before being passed into +// NOTE: The node should already be running and syncing before being passed into // this function. func NewCfFilteredChainView(node *neutrino.ChainService) (*CfFilteredChainView, error) { return &CfFilteredChainView{ @@ -93,7 +93,7 @@ func (c *CfFilteredChainView) Start() error { } // Next, we'll create our set of rescan options. Currently it's - // required that a user MUST set a addr/outpoint/txid when creating a + // required that an user MUST set a addr/outpoint/txid when creating a // rescan. To get around this, we'll add a "zero" outpoint, that won't // actually be matched. var zeroPoint wire.OutPoint diff --git a/routing/errors.go b/routing/errors.go index 1000dba2..736a047c 100644 --- a/routing/errors.go +++ b/routing/errors.go @@ -61,7 +61,7 @@ func (e *routerError) Error() string { // A compile time check to ensure routerError implements the error interface. var _ error = (*routerError)(nil) -// newErr creates an routerError by the given error description and its +// newErr creates a routerError by the given error description and its // corresponding error code. func newErr(code errorCode, a interface{}) *routerError { return &routerError{ @@ -70,7 +70,7 @@ func newErr(code errorCode, a interface{}) *routerError { } } -// newErrf creates an routerError by the given error formatted description and +// newErrf creates a routerError by the given error formatted description and // its corresponding error code. func newErrf(code errorCode, format string, a ...interface{}) *routerError { return &routerError{ diff --git a/routing/router.go b/routing/router.go index 25b60d0c..5ed3939a 100644 --- a/routing/router.go +++ b/routing/router.go @@ -1697,7 +1697,7 @@ func (r *ChannelRouter) SendPayment(payment *LightningPayment) ([32]byte, *Route // If the onion error includes a channel update, and // isn't necessarily fatal, then we'll apply the update - // an continue with the rest of the routes. + // and continue with the rest of the routes. case *lnwire.FailAmountBelowMinimum: update := onionErr.Update if err := r.applyChannelUpdate(&update); err != nil { diff --git a/routing/validation_barrier.go b/routing/validation_barrier.go index 63bdfa55..b0a0aa85 100644 --- a/routing/validation_barrier.go +++ b/routing/validation_barrier.go @@ -44,7 +44,7 @@ type ValidationBarrier struct { // NewValidationBarrier creates a new instance of a validation barrier given // the total number of active requests, and a quit channel which will be used -// to know when to kill an pending, but unfilled jobs. +// to know when to kill pending, but unfilled jobs. func NewValidationBarrier(numActiveReqs int, quitChan chan struct{}) *ValidationBarrier { diff --git a/rpcserver.go b/rpcserver.go index 6a3ba26b..e37a843f 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -1096,7 +1096,7 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, if feeRate == 0 { // If the fee rate returned isn't usable, then we'll - // fall back to an lax fee estimate. + // fall back to a lax fee estimate. feeRate, err = r.server.cc.feeEstimator.EstimateFeePerVSize(6) if err != nil { return err diff --git a/utxonursery.go b/utxonursery.go index d9f52a50..d6566a44 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -351,7 +351,7 @@ func (u *utxoNursery) IncubateOutputs(chanPoint wire.OutPoint, // Kid outputs can be swept after an initial confirmation // followed by a maturity period.Baby outputs are two stage and - // will need to wait for a absolute time out to reach a + // will need to wait for an absolute time out to reach a // confirmation, then require a relative confirmation delay. kidOutputs = make([]kidOutput, 0, 1+len(incomingHtlcs)) babyOutputs = make([]babyOutput, 0, len(outgoingHtlcs)) @@ -918,7 +918,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput, classHeight uint32) (*wire.MsgTx, error) { // Create a transaction which sweeps all the newly mature outputs into - // a output controlled by the wallet. + // an output controlled by the wallet. // TODO(roasbeef): can be more intelligent about buffering outputs to // be more efficient on-chain. @@ -1541,7 +1541,7 @@ func (c *contractMaturityReport) AddLimboStage2Htlc(kid *kidOutput) { c.htlcs = append(c.htlcs, htlcReport) } -// AddRecoveredHtlc adds an graduate output to the maturity report's htlcs, and +// AddRecoveredHtlc adds a graduate output to the maturity report's htlcs, and // contributes its amount to the recovered balance. func (c *contractMaturityReport) AddRecoveredHtlc(kid *kidOutput) { c.recoveredBalance += kid.Amount()