cmd/swarm, swarm: LocalStore storage integration
This commit is contained in:
committed by
Anton Evangelatov
parent
c94d582aa7
commit
996755c4a8
@@ -40,9 +40,7 @@ type Item struct {
|
||||
Data []byte
|
||||
AccessTimestamp int64
|
||||
StoreTimestamp int64
|
||||
// UseMockStore is a pointer to identify
|
||||
// an unset state of the field in Join function.
|
||||
UseMockStore *bool
|
||||
BinID uint64
|
||||
}
|
||||
|
||||
// Merge is a helper method to construct a new
|
||||
@@ -61,8 +59,8 @@ func (i Item) Merge(i2 Item) (new Item) {
|
||||
if i.StoreTimestamp == 0 {
|
||||
i.StoreTimestamp = i2.StoreTimestamp
|
||||
}
|
||||
if i.UseMockStore == nil {
|
||||
i.UseMockStore = i2.UseMockStore
|
||||
if i.BinID == 0 {
|
||||
i.BinID = i2.BinID
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ type indexSpec struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// schemaFieldKey retrives the complete LevelDB key for
|
||||
// schemaFieldKey retrieves the complete LevelDB key for
|
||||
// a particular field form the schema definition.
|
||||
func (db *DB) schemaFieldKey(name, fieldType string) (key []byte, err error) {
|
||||
if name == "" {
|
||||
|
Reference in New Issue
Block a user