package main import ( "fmt" "github.com/expanse-project/go-expanse/core/types" ) func main() { hash := types.NewBlockHash([]byte("Hello, world!")) fmt.Println(hash.Hex()) }
package main import ( "fmt" "github.com/expanse-project/go-expanse/core/types" ) func main() { hash1 := types.NewBlockHash([]byte("Hello, world!")) hash2 := types.NewBlockHash([]byte("Goodbye, world!")) if hash1 == hash2 { fmt.Println("The hashes are equal") } else { fmt.Println("The hashes are not equal") } }This example creates two Block Hashes from different byte arrays and compares them for equality. The output will be "The hashes are not equal".