swarm/api, swarm/storage: Delinting

This commit is contained in:
lash 2018-01-23 21:53:14 +01:00
parent 88ed2d4b2d
commit 4a7b5b862a
2 changed files with 4 additions and 2 deletions

View file

@ -69,6 +69,7 @@ func TestBzzResource(t *testing.T) {
if !bytes.Equal(b, []byte(keybyteshash)) {
t.Fatalf("resource update hash mismatch, expected '%s' got '%s'", keybyteshash, b)
}
t.Logf("creatreturn %v / %v", keybyteshash, b)
// get latest update (1.1) through resource directly
url = fmt.Sprintf("%s/bzz-resource:/%x", srv.URL, keybytes)
@ -97,7 +98,7 @@ func TestBzzResource(t *testing.T) {
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
t.Fatalf("Update returned %d", resp.Status)
t.Fatalf("Update returned %s", resp.Status)
}
// get latest update (1.2) through resource directly

View file

@ -625,7 +625,8 @@ func (self *ResourceHandler) Close() {
}
func (self *ResourceHandler) GetBlock() (uint64, error) {
ctx, _ := context.WithCancel(self.ctx)
ctx, cancel := context.WithCancel(self.ctx)
defer cancel()
blockheader, err := self.ethClient.HeaderByNumber(ctx, nil)
if err != nil {
return 0, err