1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2025-02-22 20:42:09 +00:00

Merge pull request #69 from kargakis/develop

Handle error when decoding address
This commit is contained in:
Minh T. Nguyen 2014-07-30 22:17:16 -07:00
commit 7b4423e291

View File

@ -28,6 +28,7 @@ func PayToAddrScript(addressStr string) {
// the address type. It is also required for the upcoming call to
// PayToAddrScript.
address, err := btcutil.DecodeAddress(addressStr, &btcnet.MainNetParams)
handle(err)
// Create a public key script that pays to the address.
script, err := btcscript.PayToAddrScript(address)