multi: fix several typos in godoc comments
This commit is contained in:
1 parent
b74a281b57
commit
adf0d98194
37 files changed
+70
-70
No files matched your search
@@ -215,7 +215,7 @@ func (b *BtcWallet) NewAddress(t lnwallet.AddressType, change bool) (btcutil.Add
|
||||
return b.wallet.NewAddress(defaultAccount, addrType)
|
||||
}
|
||||
|
||||
// GetPrivKey retrives the underlying private key associated with the passed
|
||||
// GetPrivKey retrieves the underlying private key associated with the passed
|
||||
// address. If the we're unable to locate the proper private key, then a
|
||||
// non-nil error will be returned.
|
||||
//
|
||||
@@ -324,7 +324,7 @@ func (b *BtcWallet) LockOutpoint(o wire.OutPoint) {
|
||||
}
|
||||
|
||||
// UnlockOutpoint unlocks an previously locked output, marking it eligible for
|
||||
// coin seleciton.
|
||||
// coin selection.
|
||||
//
|
||||
// This is a part of the WalletController interface.
|
||||
func (b *BtcWallet) UnlockOutpoint(o wire.OutPoint) {
|
||||
|
||||
@@ -39,11 +39,11 @@ var (
|
||||
walletDbName = "lnwallet.db"
|
||||
)
|
||||
|
||||
// Config is a struct which houses configuration paramters which modify the
|
||||
// Config is a struct which houses configuration parameters which modify the
|
||||
// instance of BtcWallet generated by the New() function.
|
||||
type Config struct {
|
||||
// DataDir is the name of the directory where the wallet's persistent
|
||||
// state should be sotred.
|
||||
// state should be stored.
|
||||
DataDir string
|
||||
|
||||
// LogDir is the name of the directory which should be used to store
|
||||
|
||||
+6
-6
@@ -166,7 +166,7 @@ type PaymentDescriptor struct {
|
||||
// the preimage to this hash is presented.
|
||||
RHash PaymentHash
|
||||
|
||||
// RPreimage is the preimage that settles the HTLC pointed to wthin the
|
||||
// RPreimage is the preimage that settles the HTLC pointed to within the
|
||||
// log by the ParentIndex.
|
||||
RPreimage PaymentHash
|
||||
|
||||
@@ -1121,7 +1121,7 @@ type LightningChannel struct {
|
||||
// commitment and cooperative close transactions.
|
||||
feeEstimator FeeEstimator
|
||||
|
||||
// Capcity is the total capacity of this channel.
|
||||
// Capacity is the total capacity of this channel.
|
||||
Capacity btcutil.Amount
|
||||
|
||||
// stateHintObfuscator is a 48-bit state hint that's used to obfsucate
|
||||
@@ -1400,7 +1400,7 @@ func (lc *LightningChannel) logUpdateToPayDesc(logUpdate *channeldb.LogUpdate,
|
||||
|
||||
// For offered HTLC's, we'll map that to a PaymentDescriptor with the
|
||||
// type Add, ensuring we restore the necessary fields. From the PoV of
|
||||
// the commitment chain, this HTLC was included int he remote chain,
|
||||
// the commitment chain, this HTLC was included in the remote chain,
|
||||
// but not the local chain.
|
||||
case *lnwire.UpdateAddHTLC:
|
||||
// First, we'll map all the relevant fields in the
|
||||
@@ -3234,7 +3234,7 @@ func (lc *LightningChannel) ProcessChanSyncMsg(msg *lnwire.ChannelReestablish) (
|
||||
// When the remote party receiver this message one of three things may happen:
|
||||
//
|
||||
// 1. We're fully synced and no messages need to be sent.
|
||||
// 2. We didn't get the lat CommitSig message they sent, to they'll re-send
|
||||
// 2. We didn't get the last CommitSig message they sent, to they'll re-send
|
||||
// it.
|
||||
// 3. We didn't get the last RevokeAndAck message they sent, so they'll
|
||||
// re-send it.
|
||||
@@ -4250,9 +4250,9 @@ type UnilateralCloseSummary struct {
|
||||
HtlcResolutions []OutgoingHtlcResolution
|
||||
}
|
||||
|
||||
// OutgoingHtlcResolution houses the information necessary to sweep any outging
|
||||
// OutgoingHtlcResolution houses the information necessary to sweep any outgoing
|
||||
// HTLC's after their contract has expired. This struct will be needed in one
|
||||
// of tow cases: the local party force closes the commitment transaction or the
|
||||
// of two cases: the local party force closes the commitment transaction or the
|
||||
// remote party unilaterally closes with their version of the commitment
|
||||
// transaction.
|
||||
type OutgoingHtlcResolution struct {
|
||||
|
||||
@@ -75,7 +75,7 @@ var _ FeeEstimator = (*StaticFeeEstimator)(nil)
|
||||
|
||||
// BtcdFeeEstimator is an implementation of the FeeEstimator interface backed
|
||||
// by the RPC interface of an active btcd node. This implementation will proxy
|
||||
// any fee estimation requests to btcd's RPC interace.
|
||||
// any fee estimation requests to btcd's RPC interface.
|
||||
type BtcdFeeEstimator struct {
|
||||
// fallBackFeeRate is the fall back fee rate in satoshis per byte that
|
||||
// is returned if the fee estimator does not yet have enough data to
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
)
|
||||
|
||||
// ErrNotMine is an error denoting that a WalletController instance is unable
|
||||
// to spend a specifid output.
|
||||
// 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
|
||||
@@ -132,7 +132,7 @@ type WalletController interface {
|
||||
// p2wkh, p2wsh, etc.
|
||||
NewAddress(addrType AddressType, change bool) (btcutil.Address, error)
|
||||
|
||||
// GetPrivKey retrives the underlying private key associated with the
|
||||
// GetPrivKey retrieves the underlying private key associated with the
|
||||
// passed address. If the wallet is unable to locate this private key
|
||||
// due to the address not being under control of the wallet, then an
|
||||
// error should be returned.
|
||||
@@ -278,13 +278,13 @@ type MessageSigner interface {
|
||||
// string identifier along with a 'New()' method which is responsible for
|
||||
// initializing a particular WalletController concrete implementation.
|
||||
type WalletDriver struct {
|
||||
// WalletType is a string which uniquely identifes the WalletController
|
||||
// WalletType is a string which uniquely identifies the WalletController
|
||||
// that this driver, drives.
|
||||
WalletType string
|
||||
|
||||
// New creates a new instance of a concrete WalletController
|
||||
// implementation given a variadic set up arguments. The function takes
|
||||
// a varidaic number of interface parameters in order to provide
|
||||
// a variadic number of interface parameters in order to provide
|
||||
// initialization flexibility, thereby accommodating several potential
|
||||
// WalletController implementations.
|
||||
New func(args ...interface{}) (WalletController, error)
|
||||
|
||||
@@ -1171,7 +1171,7 @@ func DeriveRevocationPubkey(revokeBase, commitPoint *btcec.PublicKey) *btcec.Pub
|
||||
// within the commitment transaction of a node in the case that they broadcast
|
||||
// a previously revoked commitment transaction.
|
||||
//
|
||||
// The private key is derived as follwos:
|
||||
// The private key is derived as follows:
|
||||
// revokePriv := (revokeBasePriv * sha256(revocationBase || commitPoint)) +
|
||||
// (commitSecret * sha256(commitPoint || revocationBase)) mod N
|
||||
//
|
||||
@@ -1241,7 +1241,7 @@ func DeriveRevocationRoot(derivationRoot *btcec.PrivateKey,
|
||||
// number is encoded using 48 bits. The lower 24 bits of the lock time are the
|
||||
// lower 24 bits of the obfuscated state number and the lower 24 bits of the
|
||||
// sequence field are the higher 24 bits. Finally before encoding, the
|
||||
// obfuscater is XOR'd against the state number in order to hide the exact
|
||||
// obfuscator is XOR'd against the state number in order to hide the exact
|
||||
// state number from the PoV of outside parties.
|
||||
func SetStateNumHint(commitTx *wire.MsgTx, stateNum uint64,
|
||||
obfuscator [StateHintSize]byte) error {
|
||||
@@ -1284,7 +1284,7 @@ func SetStateNumHint(commitTx *wire.MsgTx, stateNum uint64,
|
||||
// See setStateNumHint for further details w.r.t exactly how the state-hints
|
||||
// are encoded.
|
||||
func GetStateNumHint(commitTx *wire.MsgTx, obfuscator [StateHintSize]byte) uint64 {
|
||||
// Convert the obfuscater into a uint64, this will be used to
|
||||
// Convert the obfuscator into a uint64, this will be used to
|
||||
// de-obfuscate the final recovered state number.
|
||||
var obfs [8]byte
|
||||
copy(obfs[2:], obfuscator[:])
|
||||
|
||||
+2
-2
@@ -368,7 +368,7 @@ func (l *LightningWallet) LockedOutpoints() []*wire.OutPoint {
|
||||
return outPoints
|
||||
}
|
||||
|
||||
// ResetReservations reset the volatile wallet state which trakcs all currently
|
||||
// ResetReservations reset the volatile wallet state which tracks all currently
|
||||
// active reservations.
|
||||
func (l *LightningWallet) ResetReservations() {
|
||||
l.nextFundingID = 0
|
||||
@@ -381,7 +381,7 @@ func (l *LightningWallet) ResetReservations() {
|
||||
}
|
||||
|
||||
// ActiveReservations returns a slice of all the currently active
|
||||
// (non-cancalled) reservations.
|
||||
// (non-cancelled) reservations.
|
||||
func (l *LightningWallet) ActiveReservations() []*ChannelReservation {
|
||||
reservations := make([]*ChannelReservation, 0, len(l.fundingLimbo))
|
||||
for _, reservation := range l.fundingLimbo {
|
||||
|
||||
Reference in new issue
Block a user