mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13: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),
|
||||
}
|
||||
cs.radius.Store(storage.MaxDistance)
|
||||
exist, err := cs.db.Has(storage.RadisuKey);
|
||||
exist, err := cs.db.Has(storage.RadisuKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -72,8 +72,8 @@ func (c *ContentStorage) Put(contentKey []byte, contentId []byte, content []byte
|
|||
}
|
||||
|
||||
// Radius implements storage.ContentStorage.
|
||||
func (p *ContentStorage) Radius() *uint256.Int {
|
||||
radius := p.radius.Load()
|
||||
func (c *ContentStorage) Radius() *uint256.Int {
|
||||
radius := c.radius.Load()
|
||||
val := radius.(*uint256.Int)
|
||||
return val
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
)
|
||||
|
||||
const dataDir = "./node1"
|
||||
|
||||
var testRadius = uint256.NewInt(100000)
|
||||
|
||||
func clearNodeData() {
|
||||
|
|
@ -70,5 +71,4 @@ func TestStorage(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.Equal(t, value, val)
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue