channeldb: fix warnings found by go vet

This commit is contained in:
Olaoluwa Osuntokun 2017-02-07 16:51:58 -08:00
parent 906c0451c8
commit 7f98e8e5f1
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2
4 changed files with 4 additions and 6 deletions

@ -236,7 +236,7 @@ func (d *DB) FetchOpenChannels(nodeID *btcec.PublicKey) ([]*OpenChannel, error)
nodeChanBucket) nodeChanBucket)
if err != nil { if err != nil {
return fmt.Errorf("unable to read channel for "+ return fmt.Errorf("unable to read channel for "+
"node_key=%x: ", pub, err) "node_key=%x: %v", pub, err)
} }
channels = nodeChannels channels = nodeChannels
@ -324,7 +324,7 @@ func (d *DB) FetchAllChannels() ([]*OpenChannel, error) {
nodeChanBucket) nodeChanBucket)
if err != nil { if err != nil {
return fmt.Errorf("unable to read channel for "+ return fmt.Errorf("unable to read channel for "+
"node_key=%x: ", k, err) "node_key=%x: %v", k, err)
} }
channels = append(channels, nodeChannels...) channels = append(channels, nodeChannels...)

@ -12,7 +12,7 @@ func TestOpenWithCreate(t *testing.T) {
// this test. // this test.
tempDirName, err := ioutil.TempDir("", "channeldb") tempDirName, err := ioutil.TempDir("", "channeldb")
if err != nil { if err != nil {
t.Fatalf("unable to create temp dir: %v") t.Fatalf("unable to create temp dir: %v", err)
} }
defer os.RemoveAll(tempDirName) defer os.RemoveAll(tempDirName)

@ -130,7 +130,7 @@ func applyMigration(t *testing.T, beforeMigration, afterMigration func(d *DB),
// Than creating the version list pretending that new version was added. // Than creating the version list pretending that new version was added.
meta := &Meta{DbVersionNumber: 0} meta := &Meta{DbVersionNumber: 0}
if err := cdb.PutMeta(meta); err != nil { if err := cdb.PutMeta(meta); err != nil {
t.Fatal("unable to store meta data: %v", err) t.Fatalf("unable to store meta data: %v", err)
} }
versions := []version{ versions := []version{

@ -197,8 +197,6 @@ func (db *DB) FetchAllLinkNodes() ([]*LinkNode, error) {
linkNodes = append(linkNodes, linkNode) linkNodes = append(linkNodes, linkNode)
return nil return nil
}) })
return nil
}) })
if err != nil { if err != nil {
return nil, err return nil, err