fix taproot signature hash for single | anyonecanpay

This commit is contained in:
Craig Raw 2023-02-13 17:04:20 +02:00
parent 0002d6bae6
commit 22e70fd8e5

View file

@ -685,7 +685,7 @@ public class Transaction extends ChildMessage {
if(anyoneCanPay) {
getInputs().get(inputIndex).getOutpoint().bitcoinSerializeToStream(bos);
Utils.uint32ToByteStreamLE(spentUtxos.get(inputIndex).getValue(), bos);
Utils.int64ToByteStreamLE(spentUtxos.get(inputIndex).getValue(), bos);
byteArraySerialize(spentUtxos.get(inputIndex).getScriptBytes(), bos);
Utils.uint32ToByteStreamLE(getInputs().get(inputIndex).getSequenceNumber(), bos);
} else {