peer: fix typo

This commit is contained in:
yyforyongyu 2020-12-01 21:31:42 +08:00
parent e06768e4eb
commit f46d16ff89
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

View File

@ -216,8 +216,8 @@ type Config struct {
// SigPool is used when creating *lnwallet.LightningChannel instances.
SigPool *lnwallet.SigPool
// Wallet is used to publish transactions and generate delivery scripts
// during the coop close process.
// Wallet is used to publish transactions and generates delivery
// scripts during the coop close process.
Wallet *lnwallet.LightningWallet
// ChainNotifier is used to receive confirmations of a coop close
@ -438,7 +438,7 @@ func NewBrontide(cfg Config) *Brontide {
}
// Start starts all helper goroutines the peer needs for normal operations. In
// the case this peer has already been started, then this function is a loop.
// the case this peer has already been started, then this function is a noop.
func (p *Brontide) Start() error {
if atomic.AddInt32(&p.started, 1) != 1 {
return nil
@ -1170,10 +1170,10 @@ func waitUntilLinkActive(p *Brontide,
}
// newChanMsgStream is used to create a msgStream between the peer and
// particular channel link in the htlcswitch. We utilize additional
// particular channel link in the htlcswitch. We utilize additional
// synchronization with the fundingManager to ensure we don't attempt to
// dispatch a message to a channel before it is fully active. A reference to the
// channel this stream forwards to his held in scope to prevent unnecessary
// channel this stream forwards to is held in scope to prevent unnecessary
// lookups.
func newChanMsgStream(p *Brontide, cid lnwire.ChannelID) *msgStream {
@ -1284,7 +1284,7 @@ out:
continue
// If they sent us an address type that we don't yet
// know of, then this isn't a dire error, so we'll
// know of, then this isn't a wire error, so we'll
// simply continue parsing the remainder of their
// messages.
case *lnwire.ErrUnknownAddrType:
@ -1302,7 +1302,7 @@ out:
continue
// If the error we encountered wasn't just a message we
// didn't recognize, then we'll stop all processing s
// didn't recognize, then we'll stop all processing as
// this is a fatal error.
default:
break out
@ -2039,7 +2039,7 @@ func (p *Brontide) channelManager() {
defer p.wg.Done()
// reenableTimeout will fire once after the configured channel status
// interval has elapsed. This will trigger us to sign new channel
// interval has elapsed. This will trigger us to sign new channel
// updates and broadcast them with the "disabled" flag unset.
reenableTimeout := time.After(p.cfg.ChanActiveTimeout)
@ -2171,7 +2171,7 @@ out:
close(newChanReq.err)
// We've just received a local request to close an active
// channel. If will either kick of a cooperative channel
// channel. It will either kick of a cooperative channel
// closure negotiation, or be a notification of a breached
// contract that should be abandoned.
case req := <-p.localCloseChanReqs:
@ -2365,7 +2365,7 @@ func (p *Brontide) fetchActiveChanCloser(chanID lnwire.ChannelID) (
func chooseDeliveryScript(upfront,
requested lnwire.DeliveryAddress) (lnwire.DeliveryAddress, error) {
// If no upfront upfront shutdown script was provided, return the user
// If no upfront shutdown script was provided, return the user
// requested address (which may be nil).
if len(upfront) == 0 {
return requested, nil
@ -2531,7 +2531,7 @@ func (p *Brontide) handleLinkFailure(failure linkFailureReport) {
p.WipeChannel(&failure.chanPoint)
// If the error encountered was severe enough, we'll now force close the
// channel to prevent readding it to the switch in the future.
// channel to prevent reading it to the switch in the future.
if failure.linkErr.ForceClose {
peerLog.Warnf("Force closing link(%v)",
failure.shortChanID)