consensus/types/types_test.go
2022-10-08 20:55:01 +02:00

16 lines
281 B
Go

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)
}
}