From 7479b88a08b60418ba9d3a2876e12b28d3aab220 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Tue, 26 Mar 2019 19:04:51 -0500 Subject: [PATCH] Keep invalid state for txs which cannot have been created by the app --- .../main/java/bisq/core/dao/node/parser/TxParser.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/bisq/core/dao/node/parser/TxParser.java b/core/src/main/java/bisq/core/dao/node/parser/TxParser.java index e6d3bc69b4..72214dd659 100644 --- a/core/src/main/java/bisq/core/dao/node/parser/TxParser.java +++ b/core/src/main/java/bisq/core/dao/node/parser/TxParser.java @@ -399,9 +399,8 @@ public class TxParser { boolean hasCorrectNumOutputs = tempTx.getTempTxOutputs().size() >= 3; if (!hasCorrectNumOutputs) { log.warn("Compensation/reimbursement request tx need to have at least 3 outputs"); - // This is not a valid issuance tx - // We tolerate such an incorrect tx and do not burn the BSQ - return TxType.IRREGULAR; + // Such a transaction cannot be created by the Bisq client and is considered invalid. + return TxType.INVALID; } TempTxOutput issuanceTxOutput = tempTx.getTempTxOutputs().get(1); @@ -409,9 +408,8 @@ public class TxParser { if (!hasIssuanceOutput) { log.warn("Compensation/reimbursement request txOutput type of output at index 1 need to be ISSUANCE_CANDIDATE_OUTPUT. " + "TxOutputType={}", issuanceTxOutput.getTxOutputType()); - // This is not a valid issuance tx - // We tolerate such an incorrect tx and do not burn the BSQ - return TxType.IRREGULAR; + // Such a transaction cannot be created by the Bisq client and is considered invalid. + return TxType.INVALID; } return opReturnType == OpReturnType.COMPENSATION_REQUEST ?