utxonursery_test: properly print error msg during init failure

This commit is contained in:
Conner Fromknecht 2017-10-03 16:41:19 -07:00
parent d2e5494ef3
commit 0dcb620194
No known key found for this signature in database
GPG Key ID: 39DE78FBE6ACB0EF

View File

@ -4,6 +4,7 @@ package main
import (
"bytes"
"fmt"
"reflect"
"testing"
@ -273,11 +274,12 @@ var (
)
func init() {
// Finish initializing our test vectors by parsing the desired public keys and
// properly populating the sign descriptors of all baby and kid outputs.
for i := range signDescriptors {
pk, err := btcec.ParsePubKey(keys[i], btcec.S256())
if err != nil {
panic("unable to parse pub key: %v")
panic(fmt.Sprintf("unable to parse pub key during init: %v", err))
}
signDescriptors[i].PubKey = pk