From 60bc30dd08bb6abb39d7f8481ebd990d587e5469 Mon Sep 17 00:00:00 2001 From: cuinix <915115094@qq.com> Date: Thu, 7 Mar 2024 14:05:47 +0800 Subject: [PATCH] remove repetitive words Signed-off-by: cuinix <915115094@qq.com> --- batch/interface.go | 2 +- cert/tls.go | 4 ++-- cluster/etcd_elector.go | 2 +- htlcswitch/switch.go | 2 +- invoices/invoice_expiry_watcher.go | 2 +- kvdb/etcd/stm.go | 2 +- lnrpc/signrpc/signer.pb.go | 4 ++-- lnrpc/signrpc/signer.proto | 4 ++-- lnrpc/signrpc/signer.swagger.json | 4 ++-- lnwallet/chainfee/rates.go | 2 +- lnwallet/chanfunding/coin_select.go | 2 +- queue/priority_queue.go | 2 +- sample-lnd.conf | 2 +- sweep/sweeper.go | 6 +++--- watchtower/wtserver/server.go | 2 +- 15 files changed, 21 insertions(+), 21 deletions(-) diff --git a/batch/interface.go b/batch/interface.go index a1690c384..cd58a148c 100644 --- a/batch/interface.go +++ b/batch/interface.go @@ -48,7 +48,7 @@ func LazyAdd() SchedulerOption { // set of Requests, executes them, and returns the error from the operation. type Scheduler interface { // Execute schedules a Request for execution with the next available - // batch. This method blocks until the the underlying closure has been + // batch. This method blocks until the underlying closure has been // run against the database. The resulting error is returned to the // caller. Execute(req *Request) error diff --git a/cert/tls.go b/cert/tls.go index 755b8005f..4e5d7c81e 100644 --- a/cert/tls.go +++ b/cert/tls.go @@ -57,7 +57,7 @@ func LoadCert(certPath, keyPath string) (tls.Certificate, *x509.Certificate, return tls.Certificate{}, nil, err } - // Now parse the the PEM block of the certificate into its x509 data + // Now parse the PEM block of the certificate into its x509 data // structure so it can be examined in more detail. x509Cert, err := x509.ParseCertificate(certData.Certificate[0]) if err != nil { @@ -82,7 +82,7 @@ func LoadCertFromBytes(certBytes, keyBytes []byte) (tls.Certificate, return tls.Certificate{}, nil, err } - // Now parse the the PEM block of the certificate into its x509 data + // Now parse the PEM block of the certificate into its x509 data // structure so it can be examined in more detail. x509Cert, err := x509.ParseCertificate(certData.Certificate[0]) if err != nil { diff --git a/cluster/etcd_elector.go b/cluster/etcd_elector.go index 71057c360..25b11af25 100644 --- a/cluster/etcd_elector.go +++ b/cluster/etcd_elector.go @@ -103,7 +103,7 @@ func (e *etcdLeaderElector) Leader(ctx context.Context) (string, error) { } // Campaign will start a new leader election campaign. Campaign will block until -// the elector context is canceled or the the caller is elected as the leader. +// the elector context is canceled or the caller is elected as the leader. func (e *etcdLeaderElector) Campaign(ctx context.Context) error { return e.election.Campaign(ctx, e.id) } diff --git a/htlcswitch/switch.go b/htlcswitch/switch.go index 0e2101027..a33c385e6 100644 --- a/htlcswitch/switch.go +++ b/htlcswitch/switch.go @@ -1469,7 +1469,7 @@ func (s *Switch) failAddPacket(packet *htlcPacket, failure *LinkError) error { log.Error(failure.Error()) - // Create a failure packet for this htlc. The the full set of + // Create a failure packet for this htlc. The full set of // information about the htlc failure is included so that they can // be included in link failure notifications. failPkt := &htlcPacket{ diff --git a/invoices/invoice_expiry_watcher.go b/invoices/invoice_expiry_watcher.go index f16a7a18d..7c5539636 100644 --- a/invoices/invoice_expiry_watcher.go +++ b/invoices/invoice_expiry_watcher.go @@ -129,7 +129,7 @@ func NewInvoiceExpiryWatcher(clock clock.Clock, } } -// Start starts the the subscription handler and the main loop. Start() will +// Start starts the subscription handler and the main loop. Start() will // return with error if InvoiceExpiryWatcher is already started. Start() // expects a cancellation function passed that will be use to cancel expired // invoices by their payment hash. diff --git a/kvdb/etcd/stm.go b/kvdb/etcd/stm.go index 94a401f4b..5b3a9a977 100644 --- a/kvdb/etcd/stm.go +++ b/kvdb/etcd/stm.go @@ -1170,7 +1170,7 @@ func (s *stm) Rollback() { } // rollback will reset the read and write sets. If clearReadSet is false we'll -// only reset the the write set. +// only reset the write set. func (s *stm) rollback(clearReadSet bool) { if clearReadSet { s.rset.clear() diff --git a/lnrpc/signrpc/signer.pb.go b/lnrpc/signrpc/signer.pb.go index ca79e36df..9b23b7a40 100644 --- a/lnrpc/signrpc/signer.pb.go +++ b/lnrpc/signrpc/signer.pb.go @@ -1231,7 +1231,7 @@ type MuSig2CombineKeysRequest struct { // session. The list will always be sorted lexicographically internally. This // must include the local key which is described by the above key_loc. AllSignerPubkeys [][]byte `protobuf:"bytes,1,rep,name=all_signer_pubkeys,json=allSignerPubkeys,proto3" json:"all_signer_pubkeys,omitempty"` - // A series of optional generic tweaks to be applied to the the aggregated + // A series of optional generic tweaks to be applied to the aggregated // public key. Tweaks []*TweakDesc `protobuf:"bytes,2,rep,name=tweaks,proto3" json:"tweaks,omitempty"` // An optional taproot specific tweak that must be specified if the MuSig2 @@ -1391,7 +1391,7 @@ type MuSig2SessionRequest struct { // An optional list of all public nonces of other signing participants that // might already be known. OtherSignerPublicNonces [][]byte `protobuf:"bytes,3,rep,name=other_signer_public_nonces,json=otherSignerPublicNonces,proto3" json:"other_signer_public_nonces,omitempty"` - // A series of optional generic tweaks to be applied to the the aggregated + // A series of optional generic tweaks to be applied to the aggregated // public key. Tweaks []*TweakDesc `protobuf:"bytes,4,rep,name=tweaks,proto3" json:"tweaks,omitempty"` // An optional taproot specific tweak that must be specified if the MuSig2 diff --git a/lnrpc/signrpc/signer.proto b/lnrpc/signrpc/signer.proto index a210f2c71..28a3295dd 100644 --- a/lnrpc/signrpc/signer.proto +++ b/lnrpc/signrpc/signer.proto @@ -487,7 +487,7 @@ message MuSig2CombineKeysRequest { repeated bytes all_signer_pubkeys = 1; /* - A series of optional generic tweaks to be applied to the the aggregated + A series of optional generic tweaks to be applied to the aggregated public key. */ repeated TweakDesc tweaks = 2; @@ -551,7 +551,7 @@ message MuSig2SessionRequest { repeated bytes other_signer_public_nonces = 3; /* - A series of optional generic tweaks to be applied to the the aggregated + A series of optional generic tweaks to be applied to the aggregated public key. */ repeated TweakDesc tweaks = 4; diff --git a/lnrpc/signrpc/signer.swagger.json b/lnrpc/signrpc/signer.swagger.json index 2668d6cd2..4a7ffa8d1 100644 --- a/lnrpc/signrpc/signer.swagger.json +++ b/lnrpc/signrpc/signer.swagger.json @@ -509,7 +509,7 @@ "items": { "$ref": "#/definitions/signrpcTweakDesc" }, - "description": "A series of optional generic tweaks to be applied to the the aggregated\npublic key." + "description": "A series of optional generic tweaks to be applied to the aggregated\npublic key." }, "taproot_tweak": { "$ref": "#/definitions/signrpcTaprootTweakDesc", @@ -627,7 +627,7 @@ "items": { "$ref": "#/definitions/signrpcTweakDesc" }, - "description": "A series of optional generic tweaks to be applied to the the aggregated\npublic key." + "description": "A series of optional generic tweaks to be applied to the aggregated\npublic key." }, "taproot_tweak": { "$ref": "#/definitions/signrpcTaprootTweakDesc", diff --git a/lnwallet/chainfee/rates.go b/lnwallet/chainfee/rates.go index 0bdb8a17a..6496b39c0 100644 --- a/lnwallet/chainfee/rates.go +++ b/lnwallet/chainfee/rates.go @@ -13,7 +13,7 @@ const ( FeePerKwFloor SatPerKWeight = 253 // AbsoluteFeePerKwFloor is the lowest fee rate in sat/kw of a - // transaction that we should ever _create_. This is the the equivalent + // transaction that we should ever _create_. This is the equivalent // of 1 sat/byte in sat/kw. AbsoluteFeePerKwFloor SatPerKWeight = 250 ) diff --git a/lnwallet/chanfunding/coin_select.go b/lnwallet/chanfunding/coin_select.go index 5594d26b1..4cf50c574 100644 --- a/lnwallet/chanfunding/coin_select.go +++ b/lnwallet/chanfunding/coin_select.go @@ -307,7 +307,7 @@ func CoinSelectSubtractFees(feeRate chainfee.SatPerKWeight, amt, outputAmt := totalSat - requiredFeeNoChange changeAmt := btcutil.Amount(0) - // If the the output is too small after subtracting the fee, the coin + // If the output is too small after subtracting the fee, the coin // selection cannot be performed with an amount this small. if outputAmt < dustLimit { return nil, 0, 0, fmt.Errorf("output amount(%v) after "+ diff --git a/queue/priority_queue.go b/queue/priority_queue.go index 06485e531..8f120a767 100644 --- a/queue/priority_queue.go +++ b/queue/priority_queue.go @@ -29,7 +29,7 @@ func (pq priorityQueue) Swap(i, j int) { pq[i], pq[j] = pq[j], pq[i] } -// Push adds a new item the the priorityQueue. +// Push adds a new item the priorityQueue. func (pq *priorityQueue) Push(x interface{}) { item := x.(PriorityQueueItem) *pq = append(*pq, item) diff --git a/sample-lnd.conf b/sample-lnd.conf index abc0ea80f..dd538b07a 100644 --- a/sample-lnd.conf +++ b/sample-lnd.conf @@ -1205,7 +1205,7 @@ ; `Payment_In_FLIGHT` will be sent for compatibility concerns. ; routerrpc.usestatusinitiated=false -; Defines the the maximum duration that the probing fee estimation is allowed to +; Defines the maximum duration that the probing fee estimation is allowed to ; take. ; routerrpc.fee-estimation-timeout=1m diff --git a/sweep/sweeper.go b/sweep/sweeper.go index 49e9e0994..ebdce7d1b 100644 --- a/sweep/sweeper.go +++ b/sweep/sweeper.go @@ -292,7 +292,7 @@ type UtxoSweeperConfig struct { // sweeps, how many blocks to wait before retrying to sweep. NextAttemptDeltaFunc func(int) int32 - // MaxFeeRate is the the maximum fee rate allowed within the + // MaxFeeRate is the maximum fee rate allowed within the // UtxoSweeper. MaxFeeRate chainfee.SatPerVByte @@ -794,7 +794,7 @@ func (s *UtxoSweeper) createInputClusters() []inputCluster { // if the locktime is equal. lockTimeClusters, nonLockTimeInputs := s.clusterByLockTime(inputs) - // Cluster the the remaining inputs by sweep fee rate. + // Cluster the remaining inputs by sweep fee rate. feeClusters := s.clusterBySweepFeeRate(nonLockTimeInputs) // Since the inputs that we clustered by fee rate don't commit to a @@ -1481,7 +1481,7 @@ func DefaultNextAttemptDeltaFunc(attempts int) int32 { return 1 + rand.Int31n(1<