mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
5f76297401
Former-commit-id: 9dfe0415a7809738b7683090d08486d64ca2e4c0 [formerly c8f386658475a6d6a069ab44f63a3d6e39a80ea7] Former-commit-id: 767719430eda75648b408b4f480b25bb68870421
22 lines
359 B
Go
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")
|
|
}
|
|
}
|