func newUtxoViewpoint(sourceTxns []*wire.MsgTx, sourceTxHeights []uint32) *blockchain.UtxoViewpoint {
	if len(sourceTxns) != len(sourceTxHeights) {
		panic("each transaction must have its block height specified")
	}
	view := blockchain.NewUtxoViewpoint()
	for i, tx := range sourceTxns {
		view.AddTxOuts(provautil.NewTx(tx), sourceTxHeights[i])
	}
	return view
}
newUtxoViewpoint returns a new utxo view populated with outputs of the
provided source transactions as if there were available at the respective
block height specified in the heights slice.  The length of the source txns
and source tx heights must match or it will panic.
package mining
import (
	"encoding/hex"
	"testing"
	"github.com/bitgo/prova/blockchain"
	"github.com/bitgo/prova/chaincfg/chainhash"
	"github.com/bitgo/prova/provautil"
	"github.com/bitgo/prova/wire"
)
func newHashFromStr(hexStr string) *chainhash.Hash {
	hash, err := chainhash.NewHashFromStr(hexStr)
	if err != nil {
		panic("invalid hash in source file: " + hexStr)
	}
	return hash
}
func hexToBytes(s string) []byte {
	b, err := hex.DecodeString(s)
	if err != nil {
		panic("invalid hex in source file: " + s)
	}
	return b
}