lnd: fix golint warning which requires to add additional comments
This commit is contained in:
1 parent
0074643c10
commit
ee2379775c
9 files changed
+135
-70
No files matched your search
@@ -7,7 +7,10 @@ import (
|
||||
"github.com/roasbeef/btcd/wire"
|
||||
"github.com/roasbeef/btcutil"
|
||||
|
||||
// TODO(roasbeef) add comment which justifying this import.
|
||||
// This is required to register bdb as a valid walletdb driver. In the
|
||||
// init function of the package, it registers itself. The import is used
|
||||
// to activate the side effects w/o actually binding the package name to
|
||||
// a file-level variable.
|
||||
_ "github.com/roasbeef/btcwallet/walletdb/bdb"
|
||||
)
|
||||
|
||||
|
||||
+15
-3
@@ -25,11 +25,23 @@ import (
|
||||
var zeroHash chainhash.Hash
|
||||
|
||||
var (
|
||||
// ErrChanClosing is returned when a caller attempts to close a channel
|
||||
// that has already been closed or is in the process of being closed.
|
||||
ErrChanClosing = fmt.Errorf("channel is being closed, operation disallowed")
|
||||
ErrNoWindow = fmt.Errorf("unable to sign new commitment, the current" +
|
||||
|
||||
// ErrNoWindow is returned when revocation window is exausted.
|
||||
ErrNoWindow = fmt.Errorf("unable to sign new commitment, the current" +
|
||||
" revocation window is exhausted")
|
||||
|
||||
// ErrMaxWeightCost is returned when the cost/weight (see segwit)
|
||||
// exceeds the widely used maximum allowed policy weight limit. In this
|
||||
// case the commitment transaction can't be propagated through the
|
||||
// network.
|
||||
ErrMaxWeightCost = fmt.Errorf("commitment transaction exceed max " +
|
||||
"available weight")
|
||||
"available cost")
|
||||
|
||||
// ErrMaxHTLCNumber is returned when a proposed HTLC would exceed the
|
||||
// maximum number of allowed HTLC's if committed in a state transition
|
||||
ErrMaxHTLCNumber = fmt.Errorf("commitment transaction exceed max " +
|
||||
"htlc number")
|
||||
)
|
||||
@@ -1793,7 +1805,7 @@ func (lc *LightningChannel) ExtendRevocationWindow() (*lnwire.RevokeAndAck, erro
|
||||
return revMsg, nil
|
||||
}
|
||||
|
||||
// NextRevocationKey returns the revocation key for the _next_ commitment
|
||||
// NextRevocationkey returns the revocation key for the _next_ commitment
|
||||
// height. The pubkey returned by this function is required by the remote party
|
||||
// to extend our commitment chain with a new commitment.
|
||||
//
|
||||
|
||||
@@ -21,8 +21,11 @@ var (
|
||||
// TODO(roasbeef): remove these and use the one's defined in txscript
|
||||
// within testnet-L.
|
||||
|
||||
SequenceLockTimeSeconds = uint32(1 << 22)
|
||||
OP_CHECKSEQUENCEVERIFY byte = txscript.OP_NOP3
|
||||
// SequenceLockTimeSeconds is the 22nd bit which indicates the lock
|
||||
// time is in seconds.
|
||||
SequenceLockTimeSeconds = uint32(1 << 22)
|
||||
|
||||
OP_CHECKSEQUENCEVERIFY byte = txscript.OP_NOP3
|
||||
|
||||
// TimelockShift is used to make sure the commitment transaction is
|
||||
// spendable by setting the locktime with it so that it is larger than
|
||||
|
||||
Reference in new issue
Block a user