You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
287 B

  1. package merkletree
  2. import (
  3. "testing"
  4. "github.com/stretchr/testify/assert"
  5. )
  6. func TestNode(t *testing.T) {
  7. n := treeNode{
  8. ChildL: EmptyNodeValue,
  9. ChildR: EmptyNodeValue,
  10. }
  11. assert.Equal(t, "0xad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5", n.Ht().Hex())
  12. }