Keep invalid state for txs which cannot have been created by the app

This commit is contained in:
Manfred Karrer 2019-03-26 19:04:51 -05:00
parent 83b7ed9fea
commit 7479b88a08
No known key found for this signature in database
GPG key ID: 401250966A6B2C46

View file

@ -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 ?