prysm-pulse/sharding/database/inmemory_test.go
Raul Jordan 5f76297401 sharding: address review comments and add new subpackage
Former-commit-id: 9dfe0415a7809738b7683090d08486d64ca2e4c0 [formerly c8f386658475a6d6a069ab44f63a3d6e39a80ea7]
Former-commit-id: 767719430eda75648b408b4f480b25bb68870421
2018-05-10 21:29:42 -04:00

22 lines
359 B
Go

package database
import (
"testing"
"github.com/ethereum/go-ethereum/common"
)
func Test_ShardKVGet(t *testing.T) {
kv := MakeShardKV()
hash := common.StringToHash("ralph merkle")
kv.Put(hash, []byte{1, 2, 3})
val, err := kv.Get(hash)
if err != nil {
t.Errorf("get failed: %v", err)
}
if val == nil {
t.Errorf("no value stored for key")
}
}