multi: comprehensive typo fixes across all packages
This commit is contained in:
1 parent
72a5bc8648
commit
a93736d21e
103 files changed
+435
-435
No files matched your search
@@ -160,7 +160,7 @@ func (a ArbitratorState) String() string {
|
||||
}
|
||||
|
||||
// resolverType is an enum that enumerates the various types of resolvers. When
|
||||
// writing resolvers to disk, we prepend this to the raw bytes stroed. This
|
||||
// writing resolvers to disk, we prepend this to the raw bytes stored. This
|
||||
// allows us to properly decode the resolver into the proper type.
|
||||
type resolverType uint8
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ type ChainArbitratorConfig struct {
|
||||
// both to the utxo nursery. Once this function returns, the nursery
|
||||
// should have safely persisted the outputs to disk, and should start
|
||||
// the process of incubation. This is used when a resolver wishes to
|
||||
// pass off the output to the nursery as we're inly waiting on an
|
||||
// pass off the output to the nursery as we're only waiting on an
|
||||
// absolute/relative item block.
|
||||
IncubateOutputs func(wire.OutPoint, *lnwallet.CommitOutputResolution,
|
||||
*lnwallet.OutgoingHtlcResolution,
|
||||
|
||||
@@ -41,7 +41,7 @@ type ChainEventSubscription struct {
|
||||
// material required to bring the cheating channel peer to justice.
|
||||
ContractBreach chan *lnwallet.BreachRetribution
|
||||
|
||||
// ProcessACK is a channel that'll be used by the chainWatcher to
|
||||
// ProcessACK is a channel that will be used by the chainWatcher to
|
||||
// synchronize dispatch and processing of the notification with the act
|
||||
// of updating the state of the channel on disk. This ensures that the
|
||||
// event can be reliably handed off.
|
||||
@@ -73,7 +73,7 @@ type chainWatcher struct {
|
||||
// database to ensure that we act using the most up to date state.
|
||||
chanState *channeldb.OpenChannel
|
||||
|
||||
// stateHintObfuscator is a 48-bit state hint that's used to obfsucate
|
||||
// stateHintObfuscator is a 48-bit state hint that's used to obfuscate
|
||||
// the current state number on the commitment transactions.
|
||||
stateHintObfuscator [lnwallet.StateHintSize]byte
|
||||
|
||||
|
||||
@@ -24,21 +24,21 @@ const (
|
||||
broadcastRedeemMultiplier = 2
|
||||
)
|
||||
|
||||
// WitnessSubcription represents an intent to be notified once new witnesses
|
||||
// WitnessSubscription represents an intent to be notified once new witnesses
|
||||
// are discovered by various active contract resolvers. A contract resolver may
|
||||
// use this to be notified of when it can satisfy an incoming contract after we
|
||||
// discover the witness for an outgoing contract.
|
||||
type WitnessSubcription struct {
|
||||
type WitnessSubscription struct {
|
||||
// WitnessUpdates is a channel that newly discovered witnesses will be
|
||||
// sent over.
|
||||
//
|
||||
// TODO(roasbef): couple with WitnessType?
|
||||
// TODO(roasbeef): couple with WitnessType?
|
||||
WitnessUpdates <-chan []byte
|
||||
|
||||
// CancelSubcription is a function closure that should be used by a
|
||||
// CancelSubscription is a function closure that should be used by a
|
||||
// client to cancel the subscription once they are no longer interested
|
||||
// in receiving new updates.
|
||||
CancelSubcription func()
|
||||
CancelSubscription func()
|
||||
}
|
||||
|
||||
// WitnessBeacon is a global beacon of witnesses. Contract resolvers will use
|
||||
@@ -49,9 +49,9 @@ type WitnessSubcription struct {
|
||||
// TODO(roasbeef): need to delete the pre-images once we've used them
|
||||
// and have been sufficiently confirmed?
|
||||
type WitnessBeacon interface {
|
||||
// SubcribeUpdates returns a channel that will be sent upon *each* time
|
||||
// SubscribeUpdates returns a channel that will be sent upon *each* time
|
||||
// a new preimage is discovered.
|
||||
SubcribeUpdates() *WitnessSubcription
|
||||
SubscribeUpdates() *WitnessSubscription
|
||||
|
||||
// LookupPreImage attempts to lookup a preimage in the global cache.
|
||||
// True is returned for the second argument if the preimage is found.
|
||||
@@ -254,7 +254,7 @@ func (c *ChannelArbitrator) Start() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// If we start and ended at the awiting full resolution state, then
|
||||
// If we start and ended at the awaiting full resolution state, then
|
||||
// we'll relaunch our set of unresolved contracts.
|
||||
if startingState == StateWaitingFullResolution &&
|
||||
nextState == StateWaitingFullResolution {
|
||||
@@ -1144,7 +1144,7 @@ func (c *ChannelArbitrator) prepContractResolutions(htlcActions ChainActionMap,
|
||||
return htlcResolvers, msgsToSend, nil
|
||||
}
|
||||
|
||||
// resolveContract is a goroutien tasked with fully resolving an unresolved
|
||||
// resolveContract is a goroutine tasked with fully resolving an unresolved
|
||||
// contract. Either the initial contract will be resolved after a single step,
|
||||
// or the contract will itself create another contract to be resolved. In
|
||||
// either case, one the contract has been fully resolved, we'll signal back to
|
||||
|
||||
@@ -69,7 +69,7 @@ type ContractResolver interface {
|
||||
// given ContractResolver implementation. It contains all the items that a
|
||||
// resolver requires to carry out its duties.
|
||||
type ResolverKit struct {
|
||||
// ChannelArbiratorConfig contains all the interfaces and closures
|
||||
// ChannelArbitratorConfig contains all the interfaces and closures
|
||||
// required for the resolver to interact with outside sub-systems.
|
||||
ChannelArbitratorConfig
|
||||
|
||||
@@ -960,7 +960,7 @@ var _ ContractResolver = (*htlcOutgoingContestResolver)(nil)
|
||||
// it hasn't expired. In this case, we can resolve the HTLC if we learn of the
|
||||
// preimage, otherwise the remote party will sweep it after it expires.
|
||||
//
|
||||
// TODO(roabseef): just embed the other resolver?
|
||||
// TODO(roasbeef): just embed the other resolver?
|
||||
type htlcIncomingContestResolver struct {
|
||||
// htlcExpiry is the absolute expiry of this incoming HTLC. We use this
|
||||
// value to determine if we can exit early as if the HTLC times out,
|
||||
@@ -1055,13 +1055,13 @@ func (h *htlcIncomingContestResolver) Resolve() (ContractResolver, error) {
|
||||
// If the HTLC hasn't expired yet, then we may still be able to claim
|
||||
// it if we learn of the pre-image, so we'll wait and see if it pops
|
||||
// up, or the HTLC times out.
|
||||
preimageSubscription := h.PreimageDB.SubcribeUpdates()
|
||||
preimageSubscription := h.PreimageDB.SubscribeUpdates()
|
||||
blockEpochs, err := h.Notifier.RegisterBlockEpochNtfn()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
preimageSubscription.CancelSubcription()
|
||||
preimageSubscription.CancelSubscription()
|
||||
blockEpochs.Cancel()
|
||||
}()
|
||||
for {
|
||||
|
||||
Reference in new issue
Block a user