prysm-pulse/sharding/db.go
Raul Jordan 887b72ff11 sharding: beginning receiver methods for shard type
Former-commit-id: fc39828fa985074ec20fd3ec1a99c612630b8b1f [formerly 89a47cea8d6d4c2ab1aa77d1d713680394dc823e]
Former-commit-id: 44edff25e19c39aeefbf08f260373c0976248f74
2018-05-03 10:22:28 -05:00

22 lines
356 B
Go

package sharding
import "github.com/ethereum/go-ethereum/common"
type shardBackend struct {
kv map[*common.Hash][]byte
}
func (sb *shardBackend) Get(k *common.Hash) []byte {
return sb.kv[k]
}
func (sb *shardBackend) Put(k *common.Hash, v []byte) {
sb.kv[k] = v
return
}
func (sb *shardBackend) Delete(k *common.Hash) {
delete(sb.kv, k)
return
}