Skip to content

Commit

Permalink
fix the indexing of execution outputs;
Browse files Browse the repository at this point in the history
Signed-off-by: tcar <tcar121293@gmail.com>
  • Loading branch information
tcar121293 committed Jul 23, 2024
1 parent c04546b commit 6d53abd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chains/btc/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ func (e *Executor) outputs(tx *wire.MsgTx, proposals []*BtcTransferProposal) (ui

txOut := wire.NewTxOut(int64(prop.Data.Amount), destinationAddrByte)
tx.AddTxOut(txOut)
opReturnData := []byte(strconv.Itoa(int(prop.Source)) + "_" + strconv.Itoa(int(prop.Data.DepositNonce)) + "_" + strconv.Itoa(int(i)))

opReturnData := []byte(strconv.Itoa(int(prop.Source)) + "_" + strconv.Itoa(int(prop.Data.DepositNonce)) + "_" + strconv.Itoa(int(i*2)))
opReturnScript, err := txscript.NullDataScript(opReturnData)
if err != nil {
return 0, err
Expand Down

0 comments on commit 6d53abd

Please sign in to comment.