mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
fix: lint error
This commit is contained in:
parent
cb91f65056
commit
ad2fd55e7a
2 changed files with 13 additions and 13 deletions
|
|
@ -42,7 +42,7 @@ func NewPeppleStorage(config PeppleStorageConfig) (storage.ContentStorage, error
|
||||||
log: log.New("storage", config.NetworkName),
|
log: log.New("storage", config.NetworkName),
|
||||||
}
|
}
|
||||||
cs.radius.Store(storage.MaxDistance)
|
cs.radius.Store(storage.MaxDistance)
|
||||||
exist, err := cs.db.Has(storage.RadisuKey);
|
exist, err := cs.db.Has(storage.RadisuKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
@ -72,8 +72,8 @@ func (c *ContentStorage) Put(contentKey []byte, contentId []byte, content []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
// Radius implements storage.ContentStorage.
|
// Radius implements storage.ContentStorage.
|
||||||
func (p *ContentStorage) Radius() *uint256.Int {
|
func (c *ContentStorage) Radius() *uint256.Int {
|
||||||
radius := p.radius.Load()
|
radius := c.radius.Load()
|
||||||
val := radius.(*uint256.Int)
|
val := radius.(*uint256.Int)
|
||||||
return val
|
return val
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const dataDir = "./node1"
|
const dataDir = "./node1"
|
||||||
|
|
||||||
var testRadius = uint256.NewInt(100000)
|
var testRadius = uint256.NewInt(100000)
|
||||||
|
|
||||||
func clearNodeData() {
|
func clearNodeData() {
|
||||||
|
|
@ -70,5 +71,4 @@ func TestStorage(t *testing.T) {
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
assert.Equal(t, value, val)
|
assert.Equal(t, value, val)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue