mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 15:46:43 +00:00
commit
75885b57eb
3 changed files with 4 additions and 7 deletions
|
|
@ -120,8 +120,7 @@ func (bs *BeaconStorage) Put(contentKey []byte, contentId []byte, content []byte
|
|||
}
|
||||
|
||||
func (bs *BeaconStorage) Radius() *uint256.Int {
|
||||
// TODO
|
||||
panic("implement me")
|
||||
return storage.MaxDistance
|
||||
}
|
||||
|
||||
func (bs *BeaconStorage) getContentValue(contentId []byte) ([]byte, error) {
|
||||
|
|
|
|||
|
|
@ -38,10 +38,6 @@ const (
|
|||
ORDER BY distance DESC`
|
||||
)
|
||||
|
||||
var (
|
||||
maxDistance = uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
|
||||
)
|
||||
|
||||
var _ storage.ContentStorage = &ContentStorage{}
|
||||
var once sync.Once
|
||||
|
||||
|
|
@ -108,7 +104,7 @@ func NewHistoryStorage(config storage.PortalStorageConfig) (storage.ContentStora
|
|||
storageCapacityInBytes: config.StorageCapacityMB * 1000000,
|
||||
log: log.New("history_storage"),
|
||||
}
|
||||
hs.radius.Store(maxDistance)
|
||||
hs.radius.Store(storage.MaxDistance)
|
||||
err := hs.createTable()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ import (
|
|||
|
||||
var ErrContentNotFound = fmt.Errorf("content not found")
|
||||
|
||||
var MaxDistance = uint256.MustFromHex("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")
|
||||
|
||||
type ContentType byte
|
||||
|
||||
type ContentKey struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue