lint: fix linter complaints

This commit is contained in:
Philip Hayes 2017-05-07 14:58:53 -07:00 committed by Olaoluwa Osuntokun
parent 56793a1041
commit ce411f8e22
2 changed files with 10 additions and 9 deletions

View File

@ -231,7 +231,7 @@ func initBreachedOutputs() error {
sd := &breachSignDescs[i]
pubkey, err := btcec.ParsePubKey(breachKeys[i], btcec.S256())
if err != nil {
fmt.Errorf("unable to parse pubkey: %v", breachKeys[i])
return fmt.Errorf("unable to parse pubkey: %v", breachKeys[i])
}
sd.PubKey = pubkey
bo.signDescriptor = sd
@ -303,7 +303,7 @@ func TestRetributionSerialization(t *testing.T) {
// callback which cleans up the created temporary directories is also returned
// and intended to be executed after the test completes.
func makeTestDB() (*channeldb.DB, func(), error) {
var db *channeldb.DB = nil
var db *channeldb.DB
// First, create a temporary directory to be used for the duration of
// this test.
@ -331,7 +331,7 @@ func makeTestDB() (*channeldb.DB, func(), error) {
func countRetributions(t *testing.T, rs *retributionStore) int {
count := 0
err := rs.ForAll(func(_ *retribution) error {
count += 1
count++
return nil
})
if err != nil {

View File

@ -13,16 +13,17 @@ import (
type WitnessType uint16
const (
// Witness that allows us to spend the output of a commitment transaction
// after a relative lock-time lockout.
// CommitmentTimeLock is a witness that allows us to spend the output of a
// commitment transaction after a relative lock-time lockout.
CommitmentTimeLock WitnessType = 0
// Witness that allows us to spend a settled no-delay output immediately on
// a counterparty's commitment transaction.
// CommitmentNoDelay is a witness that allows us to spend a settled no-delay
// output immediately on a counterparty's commitment transaction.
CommitmentNoDelay WitnessType = 1
// Witness that allows us to sweep the settled output of a malicious
// counterparty's who broadcasts a revoked commitment transaction.
// CommitmentRevoke is a witness that allows us to sweep the settled output
// of a malicious counterparty's who broadcasts a revoked commitment
// transaction.
CommitmentRevoke WitnessType = 2
)