consensus/types/types_test.go

16 lines
281 B
Go
Raw Normal View History

2022-10-08 18:55:01 +00:00
package types
import "testing"
func TestDifficulty(t *testing.T) {
hexDiff := "000000000000000000000000683a8b1c"
diff, err := DifficultyFromString(hexDiff)
if err != nil {
t.Fatal(err)
}
if diff.String() != hexDiff {
t.Fatalf("expected %s, got %s", hexDiff, diff)
}
}