trivial: Fix spelling errors

- Fixes some spelling in code comments and a couple of function names
This commit is contained in:
Michael Rooke committed 2023-09-21 22:35:33 -04:00
1 parent ec585431a9
commit 78d9996620
30 files changed
+65 -52

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@ func (b *BtcWallet) FundPsbt(packet *psbt.Packet, minConfs int32,
switch accountName {
// For default accounts and single imported public keys, we'll provide a
// nil key scope to FundPsbt, allowing it to select nputs from all
// nil key scope to FundPsbt, allowing it to select inputs from all
// scopes (NP2WKH, P2WKH, P2TR). By default, the change key scope for
// these accounts will be P2WKH.
case lnwallet.DefaultAccountName:
+1 -1
View File
@@ -189,7 +189,7 @@ func TestWebAPIFeeEstimator(t *testing.T) {
expectedErr: "",
},
{
// When requested target is smaller than the min cahced
// When requested target is smaller than the min cached
// target, the fee rate of the min cached target is
// returned.
name: "API-omitted_target",
+5 -5
View File
@@ -39,10 +39,10 @@ var (
ErrUpfrontShutdownScriptMismatch = fmt.Errorf("shutdown script does not " +
"match upfront shutdown script")
// ErrProposalExeceedsMaxFee is returned when as the initiator, the
// ErrProposalExceedsMaxFee is returned when as the initiator, the
// latest fee proposal sent by the responder exceed our max fee.
// responder.
ErrProposalExeceedsMaxFee = fmt.Errorf("latest fee proposal exceeds " +
ErrProposalExceedsMaxFee = fmt.Errorf("latest fee proposal exceeds " +
"max fee")
// ErrInvalidShutdownScript is returned when we receive an address from
@@ -526,7 +526,7 @@ func (c *ChanCloser) ProcessCloseMsg(msg lnwire.Message) ([]lnwire.Message,
// use this when we craft the closure transaction.
c.remoteDeliveryScript = shutdownMsg.Address
// Now that we know their desried delivery script, we can
// Now that we know their desired delivery script, we can
// compute what our max/ideal fee will be.
c.initFeeBaseline()
@@ -722,7 +722,7 @@ func (c *ChanCloser) ProcessCloseMsg(msg lnwire.Message) ([]lnwire.Message,
)
if c.cfg.Channel.IsInitiator() && feeProposal > c.maxFee {
return nil, false, fmt.Errorf("%w: %v > %v",
ErrProposalExeceedsMaxFee, feeProposal,
ErrProposalExceedsMaxFee, feeProposal,
c.maxFee)
}
@@ -902,7 +902,7 @@ func (c *ChanCloser) proposeCloseSigned(fee btcutil.Amount) (*lnwire.ClosingSign
closeSignedMsg := lnwire.NewClosingSigned(c.cid, fee, parsedSig)
// For musig2 channels, the main sig is blank, and instead we'll send
// over a partial signature which'll be combine donce our offer is
// over a partial signature which'll be combined once our offer is
// accepted.
if partialSig != nil {
closeSignedMsg.PartialSig = &partialSig.PartialSig
+6 -2
View File
@@ -402,12 +402,16 @@ func TestMaxFeeBailOut(t *testing.T) {
// If we're the initiator, then we expect an error at
// this point.
case true:
require.ErrorIs(t, err, ErrProposalExeceedsMaxFee)
require.ErrorIs(
t, err, ErrProposalExceedsMaxFee,
)
// Otherwise, we expect things to fail for some other
// reason (invalid sig, etc).
case false:
require.NotErrorIs(t, err, ErrProposalExeceedsMaxFee)
require.NotErrorIs(
t, err, ErrProposalExceedsMaxFee,
)
}
})
}
+1 -1
View File
@@ -271,7 +271,7 @@ func CoinSelectUpToAmount(feeRate chainfee.SatPerKWeight, minAmount, maxAmount,
)
// Get total balance from coins which we need for reserve considerations
// and fee santiy checks.
// and fee sanity checks.
var totalBalance btcutil.Amount
for _, coin := range coins {
totalBalance += btcutil.Amount(coin.Value)