Apply code review changes.

This commit is contained in:
jmacxx 2022-12-29 13:57:13 -06:00
parent 1df3046371
commit fa6beffa49
No known key found for this signature in database
GPG Key ID: 155297BABFE94A1B
2 changed files with 4 additions and 17 deletions

View File

@ -61,7 +61,8 @@ public class TxValidator {
private final List<String> errorList;
private final String txId;
private Coin amount;
private Boolean isFeeCurrencyBtc = true;
@Nullable
private Boolean isFeeCurrencyBtc;
@Nullable
private Long chainHeight;
@Setter
@ -70,21 +71,7 @@ public class TxValidator {
public TxValidator(DaoStateService daoStateService,
String txId,
Coin amount,
@Nullable Boolean isFeeCurrencyBtc,
FilterManager filterManager) {
this.daoStateService = daoStateService;
this.txId = txId;
this.amount = amount;
this.isFeeCurrencyBtc = isFeeCurrencyBtc;
this.filterManager = filterManager;
this.errorList = new ArrayList<>();
this.jsonTxt = "";
}
public TxValidator(DaoStateService daoStateService,
String txId,
Coin amount,
@Nullable Boolean isFeeCurrencyBtc,
boolean isFeeCurrencyBtc,
long feePaymentBlockHeight,
FilterManager filterManager) {
this.daoStateService = daoStateService;

View File

@ -209,7 +209,7 @@ public class TxValidatorTest {
knownValuesList.forEach(offerData -> {
TxValidator txValidator = createTxValidator(offerData);
log.warn("TESTING {}", txValidator.getTxId());
if (txValidator.getIsFeeCurrencyBtc()) {
if (txValidator.getIsFeeCurrencyBtc() != null && txValidator.getIsFeeCurrencyBtc()) {
String jsonTxt = mempoolData.get(txValidator.getTxId());
if (jsonTxt == null || jsonTxt.isEmpty()) {
log.warn("{} was not found in the mempool", txValidator.getTxId());