multi: fix linter errors

This commit is contained in:
Olaoluwa Osuntokun 2017-07-30 18:22:38 -07:00
parent 563fac84cc
commit 747e0f57d1
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
5 changed files with 12 additions and 9 deletions

View File

@ -1095,7 +1095,7 @@ func (f *fundingManager) waitForFundingConfirmation(completeChan *channeldb.Open
// consider the channel open by presenting the remote party with our
// next revocation key. Without the revocation key, the remote party
// will be unable to propose state transitions.
nextRevocation, err := channel.NextRevocationkey()
nextRevocation, err := channel.NextRevocationKey()
if err != nil {
fndgLog.Errorf("unable to create next revocation: %v", err)
return

View File

@ -163,7 +163,10 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
var obsfucator [lnwallet.StateHintSize]byte
copy(obsfucator[:], aliceFirstRevoke[:])
estimator := &lnwallet.StaticFeeEstimator{24, 6}
estimator := &lnwallet.StaticFeeEstimator{
FeeRate: 24,
Confirmation: 6,
}
feePerKw := btcutil.Amount(estimator.EstimateFeePerWeight(1) * 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
// having Alice and Bob extend their revocation windows to each other.
aliceNextRevoke, err := channelAlice.NextRevocationkey()
aliceNextRevoke, err := channelAlice.NextRevocationKey()
if err != nil {
return nil, nil, nil, err
}
@ -235,7 +238,7 @@ func createTestChannel(alicePrivKey, bobPrivKey []byte,
return nil, nil, nil, err
}
bobNextRevoke, err := channelBob.NextRevocationkey()
bobNextRevoke, err := channelBob.NextRevocationKey()
if err != nil {
return nil, nil, nil, err
}

View File

@ -2495,7 +2495,7 @@ func genHtlcSigValidationJobs(localCommitmentView *commitment,
// HLTC output. Given the sighash, and the signing key, we'll be able
// to validate each signature within the worker pool.
i := 0
for index, _ := range localCommitmentView.txn.TxOut {
for index := range localCommitmentView.txn.TxOut {
var sigHash func() ([]byte, error)
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
// along with their revocation base to to extend our commitment chain with a
// new commitment.
func (lc *LightningChannel) NextRevocationkey() (*btcec.PublicKey, error) {
func (lc *LightningChannel) NextRevocationKey() (*btcec.PublicKey, error) {
lc.RLock()
defer lc.RUnlock()

View File

@ -142,7 +142,7 @@ func (m *mockNotfier) RegisterSpendNtfn(outpoint *wire.OutPoint, heightHint uint
//
// TODO(roasbeef): rename!
func initRevocationWindows(chanA, chanB *LightningChannel, windowSize int) error {
aliceNextRevoke, err := chanA.NextRevocationkey()
aliceNextRevoke, err := chanA.NextRevocationKey()
if err != nil {
return err
}
@ -150,7 +150,7 @@ func initRevocationWindows(chanA, chanB *LightningChannel, windowSize int) error
return err
}
bobNextRevoke, err := chanB.NextRevocationkey()
bobNextRevoke, err := chanB.NextRevocationKey()
if err != nil {
return err
}

View File

@ -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
// 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