Merge pull request #9388 from chloefeal/fix

Fix some typos
This commit is contained in:
Oliver Gugger authored and GitHub committed 2025-01-10 09:30:50 -06:00
commit 70e7b56713
11 files changed
+21 -21

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ import (
// SubLogCreator can be used to create a new logger for a particular subsystem. // SubLogCreator can be used to create a new logger for a particular subsystem.
type SubLogCreator interface { type SubLogCreator interface {
// Logger returns a new logger for a particular subsytem. // Logger returns a new logger for a particular subsystem.
Logger(subsystemTag string) btclog.Logger Logger(subsystemTag string) btclog.Logger
} }
+1 -1
View File
@@ -121,7 +121,7 @@ func TestProcessBlockConsumerQuitAfterSend(t *testing.T) {
require.Equal(t, mockBeat, beat) require.Equal(t, mockBeat, beat)
// Instead of sending nil to the consumer's error channel, close the // Instead of sending nil to the consumer's error channel, close the
// quit chanel. // quit channel.
close(quitChan) close(quitChan)
// Assert ProcessBlock returned nil. // Assert ProcessBlock returned nil.
+2 -2
View File
@@ -120,7 +120,7 @@ func TestDispatchSequential(t *testing.T) {
// prevConsumer specifies the previous consumer that was called. // prevConsumer specifies the previous consumer that was called.
var prevConsumer string var prevConsumer string
// Mock the ProcessBlock on consumers to reutrn immediately. // Mock the ProcessBlock on consumers to return immediately.
consumer1.On("ProcessBlock", mockBeat).Return(nil).Run( consumer1.On("ProcessBlock", mockBeat).Return(nil).Run(
func(args mock.Arguments) { func(args mock.Arguments) {
// Check the order of the consumers. // Check the order of the consumers.
@@ -260,7 +260,7 @@ func TestDispatchBlocks(t *testing.T) {
b.RegisterQueue([]Consumer{consumer}) b.RegisterQueue([]Consumer{consumer})
// Mock the consumer to return nil error on ProcessBlock. This // Mock the consumer to return nil error on ProcessBlock. This
// implictly asserts that the step `notifyQueues` is successfully // implicitly asserts that the step `notifyQueues` is successfully
// reached in the `dispatchBlocks` method. // reached in the `dispatchBlocks` method.
consumer.On("ProcessBlock", mock.Anything).Return(nil).Once() consumer.On("ProcessBlock", mock.Anything).Return(nil).Once()
+1 -1
View File
@@ -491,7 +491,7 @@ out:
func (b *BitcoindNotifier) handleRelevantTx(tx *btcutil.Tx, func (b *BitcoindNotifier) handleRelevantTx(tx *btcutil.Tx,
mempool bool, height uint32) { mempool bool, height uint32) {
// If this is a mempool spend, we'll ask the mempool notifier to hanlde // If this is a mempool spend, we'll ask the mempool notifier to handle
// it. // it.
if mempool { if mempool {
err := b.memNotifier.ProcessRelevantSpendTx(tx) err := b.memNotifier.ProcessRelevantSpendTx(tx)
+1 -1
View File
@@ -539,7 +539,7 @@ out:
func (b *BtcdNotifier) handleRelevantTx(tx *btcutil.Tx, func (b *BtcdNotifier) handleRelevantTx(tx *btcutil.Tx,
mempool bool, height uint32) { mempool bool, height uint32) {
// If this is a mempool spend, we'll ask the mempool notifier to hanlde // If this is a mempool spend, we'll ask the mempool notifier to handle
// it. // it.
if mempool { if mempool {
err := b.memNotifier.ProcessRelevantSpendTx(tx) err := b.memNotifier.ProcessRelevantSpendTx(tx)
+1 -1
View File
@@ -565,7 +565,7 @@ func TestPutRevocationLog(t *testing.T) {
}, },
{ {
// Test dust htlc is not saved. // Test dust htlc is not saved.
name: "dust htlc not saved with amout data", name: "dust htlc not saved with amount data",
commit: testCommitDust, commit: testCommitDust,
ourIndex: 0, ourIndex: 0,
theirIndex: 1, theirIndex: 1,
+2 -2
View File
@@ -1719,7 +1719,7 @@ func NewRetributionStore(db kvdb.Backend) *RetributionStore {
} }
// taprootBriefcaseFromRetInfo creates a taprootBriefcase from a retribution // taprootBriefcaseFromRetInfo creates a taprootBriefcase from a retribution
// info struct. This stores all the tap tweak informatoin we need to inrder to // info struct. This stores all the tap tweak information we need to inrder to
// be able to hadnel breaches after a restart. // be able to hadnel breaches after a restart.
func taprootBriefcaseFromRetInfo(retInfo *retributionInfo) *taprootBriefcase { func taprootBriefcaseFromRetInfo(retInfo *retributionInfo) *taprootBriefcase {
tapCase := newTaprootBriefcase() tapCase := newTaprootBriefcase()
@@ -1776,7 +1776,7 @@ func taprootBriefcaseFromRetInfo(retInfo *retributionInfo) *taprootBriefcase {
return tapCase return tapCase
} }
// applyTaprootRetInfo attaches the taproot specific inforamtion in the tapCase // applyTaprootRetInfo attaches the taproot specific information in the tapCase
// to the passed retInfo struct. // to the passed retInfo struct.
func applyTaprootRetInfo(tapCase *taprootBriefcase, func applyTaprootRetInfo(tapCase *taprootBriefcase,
retInfo *retributionInfo) error { retInfo *retributionInfo) error {
+2 -2
View File
@@ -444,7 +444,7 @@ func (h *htlcTimeoutResolver) Resolve() (ContractResolver, error) {
} }
// sweepTimeoutTx sends a second level timeout transaction to the sweeper. // sweepTimeoutTx sends a second level timeout transaction to the sweeper.
// This transaction uses the SINLGE|ANYONECANPAY flag. // This transaction uses the SINGLE|ANYONECANPAY flag.
func (h *htlcTimeoutResolver) sweepTimeoutTx() error { func (h *htlcTimeoutResolver) sweepTimeoutTx() error {
var inp input.Input var inp input.Input
if h.isTaproot() { if h.isTaproot() {
@@ -1070,7 +1070,7 @@ func (h *htlcTimeoutResolver) sweepTimeoutTxOutput() error {
// TODO(yy): use the result chan returned from SweepInput to get the // TODO(yy): use the result chan returned from SweepInput to get the
// confirmation status of this sweeping tx so we don't need to make // confirmation status of this sweeping tx so we don't need to make
// anothe subscription via `RegisterSpendNtfn` for this outpoint here // another subscription via `RegisterSpendNtfn` for this outpoint here
// in the resolver. // in the resolver.
_, err = h.Sweeper.SweepInput( _, err = h.Sweeper.SweepInput(
inp, inp,
+1 -1
View File
@@ -2709,7 +2709,7 @@ func assertBroadcast(t *testing.T, ctx *testCtx, num int) []lnwire.Message {
return msgs return msgs
} }
// assertProcessAnnouncemnt is a helper method that checks that the result of // assertProcessAnnouncement is a helper method that checks that the result of
// processing an announcement is successful. // processing an announcement is successful.
func assertProcessAnnouncement(t *testing.T, result chan error) { func assertProcessAnnouncement(t *testing.T, result chan error) {
t.Helper() t.Helper()
+1 -1
View File
@@ -337,7 +337,7 @@ Examples of common patterns w.r.t commit structures within the project:
small scale, fix typos, or any changes that do not modify the code, the small scale, fix typos, or any changes that do not modify the code, the
commit message of the HEAD commit of the PR should end with `[skip ci]` to commit message of the HEAD commit of the PR should end with `[skip ci]` to
skip the CI checks. When pushing to such an existing PR, the latest commit skip the CI checks. When pushing to such an existing PR, the latest commit
being pushed should end with `[skip ci]` as to not inadvertantly trigger the being pushed should end with `[skip ci]` as to not inadvertently trigger the
CI checks. CI checks.
## Sign your git commits ## Sign your git commits
+8 -8
View File
@@ -64,7 +64,7 @@ func testSwitchCircuitPersistence(ht *lntest.HarnessTest) {
// transaction, in channel Bob->Alice->David->Carol, order is Carol, // transaction, in channel Bob->Alice->David->Carol, order is Carol,
// David, Alice, Bob. // David, Alice, Bob.
var amountPaid = int64(5000) var amountPaid = int64(5000)
s.assertAmoutPaid(ht, amountPaid, numPayments) s.assertAmountPaid(ht, amountPaid, numPayments)
// Lastly, we will send one more payment to ensure all channels are // Lastly, we will send one more payment to ensure all channels are
// still functioning properly. // still functioning properly.
@@ -80,7 +80,7 @@ func testSwitchCircuitPersistence(ht *lntest.HarnessTest) {
ht.CompletePaymentRequests(s.bob, payReqs) ht.CompletePaymentRequests(s.bob, payReqs)
amountPaid = int64(6000) amountPaid = int64(6000)
s.assertAmoutPaid(ht, amountPaid, numPayments+1) s.assertAmountPaid(ht, amountPaid, numPayments+1)
} }
// testSwitchOfflineDelivery constructs a set of multihop payments, and tests // testSwitchOfflineDelivery constructs a set of multihop payments, and tests
@@ -136,7 +136,7 @@ func testSwitchOfflineDelivery(ht *lntest.HarnessTest) {
// transaction, in channel Bob->Alice->David->Carol, order is Carol, // transaction, in channel Bob->Alice->David->Carol, order is Carol,
// David, Alice, Bob. // David, Alice, Bob.
var amountPaid = int64(5000) var amountPaid = int64(5000)
s.assertAmoutPaid(ht, amountPaid, numPayments) s.assertAmountPaid(ht, amountPaid, numPayments)
// Lastly, we will send one more payment to ensure all channels are // Lastly, we will send one more payment to ensure all channels are
// still functioning properly. // still functioning properly.
@@ -152,7 +152,7 @@ func testSwitchOfflineDelivery(ht *lntest.HarnessTest) {
ht.CompletePaymentRequests(s.bob, payReqs) ht.CompletePaymentRequests(s.bob, payReqs)
amountPaid = int64(6000) amountPaid = int64(6000)
s.assertAmoutPaid(ht, amountPaid, numPayments+1) s.assertAmountPaid(ht, amountPaid, numPayments+1)
} }
// testSwitchOfflineDeliveryPersistence constructs a set of multihop payments, // testSwitchOfflineDeliveryPersistence constructs a set of multihop payments,
@@ -218,7 +218,7 @@ func testSwitchOfflineDeliveryPersistence(ht *lntest.HarnessTest) {
// transaction, in channel Bob->Alice->David->Carol, order is Carol, // transaction, in channel Bob->Alice->David->Carol, order is Carol,
// David, Alice, Bob. // David, Alice, Bob.
var amountPaid = int64(5000) var amountPaid = int64(5000)
s.assertAmoutPaid(ht, amountPaid, numPayments) s.assertAmountPaid(ht, amountPaid, numPayments)
// Lastly, we will send one more payment to ensure all channels are // Lastly, we will send one more payment to ensure all channels are
// still functioning properly. // still functioning properly.
@@ -238,7 +238,7 @@ func testSwitchOfflineDeliveryPersistence(ht *lntest.HarnessTest) {
ht.CompletePaymentRequests(s.bob, payReqs) ht.CompletePaymentRequests(s.bob, payReqs)
amountPaid = int64(6000) amountPaid = int64(6000)
s.assertAmoutPaid(ht, amountPaid, numPayments+1) s.assertAmountPaid(ht, amountPaid, numPayments+1)
} }
// testSwitchOfflineDeliveryOutgoingOffline constructs a set of multihop // testSwitchOfflineDeliveryOutgoingOffline constructs a set of multihop
@@ -453,10 +453,10 @@ func (s *scenarioFourNodes) assertHTLCs(ht *lntest.HarnessTest, num int) {
ht.AssertNumActiveHtlcs(s.carol, num) ht.AssertNumActiveHtlcs(s.carol, num)
} }
// assertAmoutPaid is a helper method which takes a given paid amount // assertAmountPaid is a helper method which takes a given paid amount
// and number of payments and asserts the desired payments are made in // and number of payments and asserts the desired payments are made in
// the four nodes. // the four nodes.
func (s *scenarioFourNodes) assertAmoutPaid(ht *lntest.HarnessTest, func (s *scenarioFourNodes) assertAmountPaid(ht *lntest.HarnessTest,
amt int64, num int64) { amt int64, num int64) {
ht.AssertAmountPaid( ht.AssertAmountPaid(