channeldb: fix warnings found by go vet
This commit is contained in:
parent
906c0451c8
commit
7f98e8e5f1
@ -236,7 +236,7 @@ func (d *DB) FetchOpenChannels(nodeID *btcec.PublicKey) ([]*OpenChannel, error)
|
||||
nodeChanBucket)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to read channel for "+
|
||||
"node_key=%x: ", pub, err)
|
||||
"node_key=%x: %v", pub, err)
|
||||
}
|
||||
|
||||
channels = nodeChannels
|
||||
@ -324,7 +324,7 @@ func (d *DB) FetchAllChannels() ([]*OpenChannel, error) {
|
||||
nodeChanBucket)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to read channel for "+
|
||||
"node_key=%x: ", k, err)
|
||||
"node_key=%x: %v", k, err)
|
||||
}
|
||||
|
||||
channels = append(channels, nodeChannels...)
|
||||
|
@ -12,7 +12,7 @@ func TestOpenWithCreate(t *testing.T) {
|
||||
// this test.
|
||||
tempDirName, err := ioutil.TempDir("", "channeldb")
|
||||
if err != nil {
|
||||
t.Fatalf("unable to create temp dir: %v")
|
||||
t.Fatalf("unable to create temp dir: %v", err)
|
||||
}
|
||||
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.
|
||||
meta := &Meta{DbVersionNumber: 0}
|
||||
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{
|
||||
|
@ -197,8 +197,6 @@ func (db *DB) FetchAllLinkNodes() ([]*LinkNode, error) {
|
||||
linkNodes = append(linkNodes, linkNode)
|
||||
return nil
|
||||
})
|
||||
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user