AbstractBlockChain: when cloning a transaction don't loop through MessageSerializer

This commit is contained in:
Andreas Schildbach 2023-04-03 10:31:54 +02:00
parent a26216fb50
commit c1e83e53c4

View File

@ -917,7 +917,7 @@ public abstract class AbstractBlockChain {
try {
falsePositives.remove(tx.getTxId());
if (clone)
tx = tx.params.getDefaultSerializer().makeTransaction(ByteBuffer.wrap(tx.bitcoinSerialize()));
tx = new Transaction(tx.getParams(), ByteBuffer.wrap(tx.bitcoinSerialize()));
listener.receiveFromBlock(tx, block, blockType, relativityOffset++);
} catch (ScriptException e) {
// We don't want scripts we don't understand to break the block chain so just note that this tx was