diff --git a/README.md b/README.md index 6baad9ce..7cdd4a84 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ package main import ( "flag" "fmt" + "log" "github.com/conformal/btcnet" "github.com/conformal/btcutil" @@ -42,10 +43,9 @@ func main() { // Create and print new payment address, specific to the active network. pubKeyHash := make([]byte, 20) - addr, err := btcutil.NewAddressPubKeyHash(pubKeyHash, netParams.Net) + addr, err := btcutil.NewAddressPubKeyHash(pubKeyHash, netParams) if err != nil { - // badness - return + log.Fatal(err) } fmt.Println(addr) } diff --git a/doc.go b/doc.go index f3d8d2b1..649d4a17 100644 --- a/doc.go +++ b/doc.go @@ -48,7 +48,7 @@ // // // Create and print new payment address, specific to the active network. // pubKeyHash := make([]byte, 20) -// addr, err := btcutil.NewAddressPubKeyHash(pubKeyHash, netParams.Net) +// addr, err := btcutil.NewAddressPubKeyHash(pubKeyHash, netParams) // if err != nil { // log.Fatal(err) // }