multi: Fix typos [skip ci]
This commit is contained in:
139 files changed
+254
-254
No files matched your search
@@ -287,7 +287,7 @@ func (c ChannelType) HasFundingTx() bool {
|
||||
return c&NoFundingTxBit == 0
|
||||
}
|
||||
|
||||
// HasAnchors returns true if this channel type has anchor ouputs on its
|
||||
// HasAnchors returns true if this channel type has anchor outputs on its
|
||||
// commitment.
|
||||
func (c ChannelType) HasAnchors() bool {
|
||||
return c&AnchorOutputsBit == AnchorOutputsBit
|
||||
@@ -3192,7 +3192,7 @@ func serializeChannelCloseSummary(w io.Writer, cs *ChannelCloseSummary) error {
|
||||
|
||||
// The RemoteNextRevocation field is optional, as it's possible for a
|
||||
// channel to be closed before we learn of the next unrevoked
|
||||
// revocation point for the remote party. Write a boolen indicating
|
||||
// revocation point for the remote party. Write a boolean indicating
|
||||
// whether this field is present or not.
|
||||
if err := WriteElements(w, cs.RemoteNextRevocation != nil); err != nil {
|
||||
return err
|
||||
@@ -3311,7 +3311,7 @@ func writeChanConfig(b io.Writer, c *ChannelConfig) error {
|
||||
}
|
||||
|
||||
// fundingTxPresent returns true if expect the funding transcation to be found
|
||||
// on disk or already populated within the passed oen chanel struct.
|
||||
// on disk or already populated within the passed open channel struct.
|
||||
func fundingTxPresent(channel *OpenChannel) bool {
|
||||
chanType := channel.ChanType
|
||||
|
||||
|
||||
+2
-2
@@ -1037,7 +1037,7 @@ func (c *ChannelStateDB) pruneLinkNode(openChannels []*OpenChannel,
|
||||
return c.linkNodeDB.DeleteLinkNode(remotePub)
|
||||
}
|
||||
|
||||
// PruneLinkNodes attempts to prune all link nodes found within the databse with
|
||||
// PruneLinkNodes attempts to prune all link nodes found within the database with
|
||||
// whom we no longer have any open channels with.
|
||||
func (c *ChannelStateDB) PruneLinkNodes() error {
|
||||
allLinkNodes, err := c.linkNodeDB.FetchAllLinkNodes()
|
||||
@@ -1189,7 +1189,7 @@ func (c *ChannelStateDB) AbandonChannel(chanPoint *wire.OutPoint,
|
||||
}
|
||||
|
||||
// If the channel was already closed, then we don't return an
|
||||
// error as we'd like fro this step to be repeatable.
|
||||
// error as we'd like this step to be repeatable.
|
||||
return nil
|
||||
case err != nil:
|
||||
return err
|
||||
|
||||
@@ -448,7 +448,7 @@ func TestRestoreChannelShells(t *testing.T) {
|
||||
// The node should have the same address, as specified in the channel
|
||||
// shell.
|
||||
if reflect.DeepEqual(linkNode.Addresses, channelShell.NodeAddrs) {
|
||||
t.Fatalf("addr mismach: expected %v, got %v",
|
||||
t.Fatalf("addr mismatch: expected %v, got %v",
|
||||
linkNode.Addresses, channelShell.NodeAddrs)
|
||||
}
|
||||
}
|
||||
@@ -738,7 +738,7 @@ func TestFetchHistoricalChannel(t *testing.T) {
|
||||
|
||||
histChannel, err := cdb.FetchHistoricalChannel(&channel.FundingOutpoint)
|
||||
if err != nil {
|
||||
t.Fatalf("unexepected error getting channel: %v", err)
|
||||
t.Fatalf("unexpected error getting channel: %v", err)
|
||||
}
|
||||
|
||||
// FetchHistoricalChannel will attach the cdb to channel.Db, we set it
|
||||
|
||||
@@ -47,7 +47,7 @@ func (d *DB) ForwardingLog() *ForwardingLog {
|
||||
}
|
||||
}
|
||||
|
||||
// ForwardingLog is a time series database that logs the fulfilment of payment
|
||||
// ForwardingLog is a time series database that logs the fulfillment of payment
|
||||
// circuits by a lightning network daemon. The log contains a series of
|
||||
// forwarding events which map a timestamp to a forwarding event. A forwarding
|
||||
// event describes which channels were used to create+settle a circuit, and the
|
||||
@@ -204,7 +204,7 @@ type ForwardingEventQuery struct {
|
||||
|
||||
// ForwardingLogTimeSlice is the response to a forwarding query. It includes
|
||||
// the original query, the set events that match the query, and an integer
|
||||
// which represents the offset index of the last item in the set of retuned
|
||||
// which represents the offset index of the last item in the set of returned
|
||||
// events. This integer allows callers to resume their query using this offset
|
||||
// in the event that the query's response exceeds the max number of returnable
|
||||
// events.
|
||||
|
||||
@@ -895,7 +895,7 @@ func validateInvoice(i *Invoice, paymentHash lntypes.Hash) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsPending returns ture if the invoice is in ContractOpen state.
|
||||
// IsPending returns true if the invoice is in ContractOpen state.
|
||||
func (i *Invoice) IsPending() bool {
|
||||
return i.State == ContractOpen || i.State == ContractAccepted
|
||||
}
|
||||
@@ -1189,7 +1189,7 @@ func fetchInvoiceNumByRef(invoiceIndex, payAddrIndex, setIDIndex kvdb.RBucket,
|
||||
}
|
||||
}
|
||||
|
||||
// ScanInvoices scans trough all invoices and calls the passed scanFunc for
|
||||
// ScanInvoices scans through all invoices and calls the passed scanFunc for
|
||||
// for each invoice with its respective payment hash. Additionally a reset()
|
||||
// closure is passed which is used to reset/initialize partial results and also
|
||||
// to signal if the kvdb.View transaction has been retried.
|
||||
@@ -3020,7 +3020,7 @@ func updateInvoiceState(invoice *Invoice, hash *lntypes.Hash,
|
||||
}
|
||||
}
|
||||
|
||||
// cancelSingleHtlc validates cancelation of a single htlc and update its state.
|
||||
// cancelSingleHtlc validates cancellation of a single htlc and update its state.
|
||||
func cancelSingleHtlc(resolveTime time.Time, htlc *InvoiceHTLC,
|
||||
invState ContractState) error {
|
||||
|
||||
|
||||
@@ -75,6 +75,6 @@ func (g *GossipTimestampRange) MsgType() MessageType {
|
||||
func (g *GossipTimestampRange) MaxPayloadLength(uint32) uint32 {
|
||||
// 32 + 4 + 4
|
||||
//
|
||||
// TODO(roasbeef): update to 8 byte timestmaps?
|
||||
// TODO(roasbeef): update to 8 byte timestamps?
|
||||
return 40
|
||||
}
|
||||
@@ -280,7 +280,7 @@ func SerializeChannelCloseSummary(w io.Writer, cs *common.ChannelCloseSummary) e
|
||||
|
||||
// The RemoteNextRevocation field is optional, as it's possible for a
|
||||
// channel to be closed before we learn of the next unrevoked
|
||||
// revocation point for the remote party. Write a boolen indicating
|
||||
// revocation point for the remote party. Write a boolean indicating
|
||||
// whether this field is present or not.
|
||||
if err := WriteElements(w, cs.RemoteNextRevocation != nil); err != nil {
|
||||
return err
|
||||
|
||||
@@ -379,7 +379,7 @@ func SerializeChannelCloseSummary(w io.Writer, cs *common.ChannelCloseSummary) e
|
||||
|
||||
// The RemoteNextRevocation field is optional, as it's possible for a
|
||||
// channel to be closed before we learn of the next unrevoked
|
||||
// revocation point for the remote party. Write a boolen indicating
|
||||
// revocation point for the remote party. Write a boolean indicating
|
||||
// whether this field is present or not.
|
||||
if err := WriteElements(w, cs.RemoteNextRevocation != nil); err != nil {
|
||||
return err
|
||||
|
||||
@@ -221,7 +221,7 @@ func migrateOpenChanBucket(tx kvdb.RwTx) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Remote unsiged updates as well.
|
||||
// Remote unsigned updates as well.
|
||||
updateBytes = chanBucket.Get(remoteUnsignedLocalUpdatesKey)
|
||||
if updateBytes != nil {
|
||||
legacyUnsignedUpdates, err := legacy.DeserializeLogUpdates(
|
||||
@@ -316,7 +316,7 @@ func migrateForwardingPackages(tx kvdb.RwTx) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Now load all forwading packages using the legacy encoding.
|
||||
// Now load all forwarding packages using the legacy encoding.
|
||||
var pkgsToMigrate []*common.FwdPkg
|
||||
for _, source := range sources {
|
||||
packager := legacy.NewChannelPackager(source)
|
||||
|
||||
@@ -622,7 +622,7 @@ func serializeChannelCloseSummary(w io.Writer, cs *ChannelCloseSummary) error {
|
||||
|
||||
// The RemoteNextRevocation field is optional, as it's possible for a
|
||||
// channel to be closed before we learn of the next unrevoked
|
||||
// revocation point for the remote party. Write a boolen indicating
|
||||
// revocation point for the remote party. Write a boolean indicating
|
||||
// whether this field is present or not.
|
||||
if err := WriteElements(w, cs.RemoteNextRevocation != nil); err != nil {
|
||||
return err
|
||||
|
||||
@@ -626,7 +626,7 @@ func TestOutgoingPaymentsMigration(t *testing.T) {
|
||||
// Order of payments should be be preserved.
|
||||
old := oldPayments[i]
|
||||
|
||||
// Check the individial fields.
|
||||
// Check the individual fields.
|
||||
if p.Info.Value != old.Terms.Value {
|
||||
t.Fatalf("value mismatch")
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ func Features(features *lnwire.FeatureVector) func(*Invoice) {
|
||||
}
|
||||
|
||||
// PaymentAddr is a functional option that allows callers of NewInvoice to set
|
||||
// the desired payment address tht is advertised on the invoice.
|
||||
// the desired payment address that is advertised on the invoice.
|
||||
func PaymentAddr(addr [32]byte) func(*Invoice) {
|
||||
return func(i *Invoice) {
|
||||
i.PaymentAddr = &addr
|
||||
|
||||
@@ -157,7 +157,7 @@ func OptionClock(clock clock.Clock) OptionModifier {
|
||||
}
|
||||
}
|
||||
|
||||
// OptionDryRunMigration controls whether or not to intentially fail to commit a
|
||||
// OptionDryRunMigration controls whether or not to intentionally fail to commit a
|
||||
// successful migration that occurs when opening the database.
|
||||
func OptionDryRunMigration(dryRun bool) OptionModifier {
|
||||
return func(o *Options) {
|
||||
|
||||
@@ -64,11 +64,11 @@ var (
|
||||
"amount")
|
||||
|
||||
// ErrNonMPPayment is returned if we try to register an MPP attempt for
|
||||
// a payment that already has a non-MPP attempt regitered.
|
||||
// a payment that already has a non-MPP attempt registered.
|
||||
ErrNonMPPayment = errors.New("payment has non-MPP attempts")
|
||||
|
||||
// ErrMPPayment is returned if we try to register a non-MPP attempt for
|
||||
// a payment that already has an MPP attempt regitered.
|
||||
// a payment that already has an MPP attempt registered.
|
||||
ErrMPPayment = errors.New("payment has MPP attempts")
|
||||
|
||||
// ErrMPPPaymentAddrMismatch is returned if we try to register an MPP
|
||||
@@ -106,7 +106,7 @@ func NewPaymentControl(db *DB) *PaymentControl {
|
||||
|
||||
// InitPayment checks or records the given PaymentCreationInfo with the DB,
|
||||
// making sure it does not already exist as an in-flight payment. When this
|
||||
// method returns successfully, the payment is guranteeed to be in the InFlight
|
||||
// method returns successfully, the payment is guaranteed to be in the InFlight
|
||||
// state.
|
||||
func (p *PaymentControl) InitPayment(paymentHash lntypes.Hash,
|
||||
info *PaymentCreationInfo) error {
|
||||
|
||||
@@ -551,7 +551,7 @@ func TestPaymentControlDeleteNonInFligt(t *testing.T) {
|
||||
require.Equal(t, 1, indexCount)
|
||||
}
|
||||
|
||||
// TestPaymentControlDeletePayments tests that DeletePayments correcly deletes
|
||||
// TestPaymentControlDeletePayments tests that DeletePayments correctly deletes
|
||||
// information about completed payments from the database.
|
||||
func TestPaymentControlDeletePayments(t *testing.T) {
|
||||
t.Parallel()
|
||||
@@ -605,7 +605,7 @@ func TestPaymentControlDeletePayments(t *testing.T) {
|
||||
assertPayments(t, db, payments[2:])
|
||||
}
|
||||
|
||||
// TestPaymentControlDeleteSinglePayment tests that DeletePayment correcly
|
||||
// TestPaymentControlDeleteSinglePayment tests that DeletePayment correctly
|
||||
// deletes information about a completed payment from the database.
|
||||
func TestPaymentControlDeleteSinglePayment(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -382,7 +382,7 @@ func fetchPayment(bucket kvdb.RBucket) (*MPPayment, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// fetchHtlcAttempts retrives all htlc attempts made for the payment found in
|
||||
// fetchHtlcAttempts retrieves all htlc attempts made for the payment found in
|
||||
// the given bucket.
|
||||
func fetchHtlcAttempts(bucket kvdb.RBucket) ([]HTLCAttempt, error) {
|
||||
htlcsMap := make(map[uint64]*HTLCAttempt)
|
||||
|
||||
Reference in new issue
Block a user