diff --git a/attestation/attestclient.go b/attestation/attestclient.go index b04e4d5..65d1742 100644 --- a/attestation/attestclient.go +++ b/attestation/attestclient.go @@ -462,8 +462,9 @@ func (w *AttestClient) SignTransaction(hash chainhash.Hash, msgTx wire.MsgTx) ( witnessProgram, err := txscript.PayToAddrScript(addrPubKey) log.Infof("Witness program: %v", hex.EncodeToString(witnessProgram)) log.Infof("TxOut amt %v", msgTx.TxOut[0].Value) + log.Infof("Prev TxOut amt %v", prevTx.MsgTx().TxOut[0].Value) msgTx.TxOut[0].PkScript = witnessProgram - msgTx.TxOut[0].Value = msgTx.TxOut[0].Value - 2200 + msgTx.TxOut[0].Value = prevTx.MsgTx().TxOut[0].Value - 2200 // witnessScript := hex.EncodeToString(witnessProgram) // // add prev attestation tx input info and priv key // inputs = append(inputs, btcjson.RawTxWitnessInput{