mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
swarm/api, swarm/storage: Delinting
This commit is contained in:
parent
88ed2d4b2d
commit
4a7b5b862a
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue