multi: fix a-vs-an typos

This commit is contained in:
practicalswift 2018-04-18 04:02:04 +02:00 committed by Olaoluwa Osuntokun
parent 0720e83840
commit 663c396235
45 changed files with 67 additions and 67 deletions

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 (

View File

@ -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.

View File

@ -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

View File

@ -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()

View File

@ -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.

View File

@ -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)

View File

@ -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.

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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) {

View File

@ -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++ {

View File

@ -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.
*/

View File

@ -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",

View File

@ -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 {

View File

@ -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) {

View File

@ -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 {

View File

@ -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]) {

View File

@ -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)

View File

@ -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.

View File

@ -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 {

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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 {

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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 {

View File

@ -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.

View File

@ -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

View File

@ -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{

View File

@ -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 {

View File

@ -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 {

View File

@ -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

View File

@ -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()