2019-05-27 13:51:49 +00:00
|
|
|
package trie
|
|
|
|
|
|
|
|
import (
|
2020-12-03 17:01:32 +00:00
|
|
|
"fmt"
|
2019-05-27 13:51:49 +00:00
|
|
|
"testing"
|
|
|
|
|
2021-05-20 18:25:53 +00:00
|
|
|
"github.com/ledgerwatch/erigon/common"
|
2019-05-27 13:51:49 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestValue(t *testing.T) {
|
|
|
|
t.Skip("should be restored. skipped for turbo-geth")
|
|
|
|
|
|
|
|
h := newHasher(false)
|
|
|
|
var hn common.Hash
|
|
|
|
h.hash(valueNode([]byte("BLAH")), false, hn[:])
|
|
|
|
expected := "0x0"
|
2020-12-03 17:01:32 +00:00
|
|
|
actual := fmt.Sprintf("0x%x", hn[:])
|
|
|
|
if actual != expected {
|
|
|
|
t.Errorf("Expected %s, got %x", expected, actual)
|
2019-05-27 13:51:49 +00:00
|
|
|
}
|
|
|
|
}
|