multi: fix linter errors
This commit is contained in:
parent
563fac84cc
commit
747e0f57d1
@ -1095,7 +1095,7 @@ func (f *fundingManager) waitForFundingConfirmation(completeChan *channeldb.Open
|
|||||||
// consider the channel open by presenting the remote party with our
|
// consider the channel open by presenting the remote party with our
|
||||||
// next revocation key. Without the revocation key, the remote party
|
// next revocation key. Without the revocation key, the remote party
|
||||||
// will be unable to propose state transitions.
|
// will be unable to propose state transitions.
|
||||||
nextRevocation, err := channel.NextRevocationkey()
|
nextRevocation, err := channel.NextRevocationKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fndgLog.Errorf("unable to create next revocation: %v", err)
|
fndgLog.Errorf("unable to create next revocation: %v", err)
|
||||||
return
|
return
|
||||||
|
@ -163,7 +163,10 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
|||||||
var obsfucator [lnwallet.StateHintSize]byte
|
var obsfucator [lnwallet.StateHintSize]byte
|
||||||
copy(obsfucator[:], aliceFirstRevoke[:])
|
copy(obsfucator[:], aliceFirstRevoke[:])
|
||||||
|
|
||||||
estimator := &lnwallet.StaticFeeEstimator{24, 6}
|
estimator := &lnwallet.StaticFeeEstimator{
|
||||||
|
FeeRate: 24,
|
||||||
|
Confirmation: 6,
|
||||||
|
}
|
||||||
feePerKw := btcutil.Amount(estimator.EstimateFeePerWeight(1) * 1000)
|
feePerKw := btcutil.Amount(estimator.EstimateFeePerWeight(1) * 1000)
|
||||||
commitFee := (feePerKw * btcutil.Amount(724)) / 1000
|
commitFee := (feePerKw * btcutil.Amount(724)) / 1000
|
||||||
|
|
||||||
@ -227,7 +230,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
|||||||
|
|
||||||
// Now that the channel are open, simulate the start of a session by
|
// Now that the channel are open, simulate the start of a session by
|
||||||
// having Alice and Bob extend their revocation windows to each other.
|
// having Alice and Bob extend their revocation windows to each other.
|
||||||
aliceNextRevoke, err := channelAlice.NextRevocationkey()
|
aliceNextRevoke, err := channelAlice.NextRevocationKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
@ -235,7 +238,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
|
|||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
bobNextRevoke, err := channelBob.NextRevocationkey()
|
bobNextRevoke, err := channelBob.NextRevocationKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
@ -2495,7 +2495,7 @@ func genHtlcSigValidationJobs(localCommitmentView *commitment,
|
|||||||
// HLTC output. Given the sighash, and the signing key, we'll be able
|
// HLTC output. Given the sighash, and the signing key, we'll be able
|
||||||
// to validate each signature within the worker pool.
|
// to validate each signature within the worker pool.
|
||||||
i := 0
|
i := 0
|
||||||
for index, _ := range localCommitmentView.txn.TxOut {
|
for index := range localCommitmentView.txn.TxOut {
|
||||||
var sigHash func() ([]byte, error)
|
var sigHash func() ([]byte, error)
|
||||||
|
|
||||||
outputIndex := int32(index)
|
outputIndex := int32(index)
|
||||||
@ -2953,7 +2953,7 @@ func (lc *LightningChannel) ReceiveRevocation(revMsg *lnwire.RevokeAndAck) ([]*P
|
|||||||
// height. The pubkey returned by this function is required by the remote party
|
// height. The pubkey returned by this function is required by the remote party
|
||||||
// along with their revocation base to to extend our commitment chain with a
|
// along with their revocation base to to extend our commitment chain with a
|
||||||
// new commitment.
|
// new commitment.
|
||||||
func (lc *LightningChannel) NextRevocationkey() (*btcec.PublicKey, error) {
|
func (lc *LightningChannel) NextRevocationKey() (*btcec.PublicKey, error) {
|
||||||
lc.RLock()
|
lc.RLock()
|
||||||
defer lc.RUnlock()
|
defer lc.RUnlock()
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ func (m *mockNotfier) RegisterSpendNtfn(outpoint *wire.OutPoint, heightHint uint
|
|||||||
//
|
//
|
||||||
// TODO(roasbeef): rename!
|
// TODO(roasbeef): rename!
|
||||||
func initRevocationWindows(chanA, chanB *LightningChannel, windowSize int) error {
|
func initRevocationWindows(chanA, chanB *LightningChannel, windowSize int) error {
|
||||||
aliceNextRevoke, err := chanA.NextRevocationkey()
|
aliceNextRevoke, err := chanA.NextRevocationKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@ func initRevocationWindows(chanA, chanB *LightningChannel, windowSize int) error
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
bobNextRevoke, err := chanB.NextRevocationkey()
|
bobNextRevoke, err := chanB.NextRevocationKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1019,7 @@ func TweakPubKeyWithTweak(pubKey *btcec.PublicKey, tweakBytes []byte) *btcec.Pub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TweakPrivKek tweaks the private key of a public base point given a per
|
// TweakPrivKey tweaks the private key of a public base point given a per
|
||||||
// commitment point. The per commitment secret is the revealed revocation
|
// commitment point. The per commitment secret is the revealed revocation
|
||||||
// secret for the commitment state in question. This private key will only need
|
// secret for the commitment state in question. This private key will only need
|
||||||
// to be generated in the case that a channel counter party broadcasts a
|
// to be generated in the case that a channel counter party broadcasts a
|
||||||
|
Loading…
Reference in New Issue
Block a user