diff --git a/src/main/java/bisq/core/dao/node/parser/ParsingModel.java b/src/main/java/bisq/core/dao/node/parser/ParsingModel.java index 7ae50c2c..5f7734ae 100644 --- a/src/main/java/bisq/core/dao/node/parser/ParsingModel.java +++ b/src/main/java/bisq/core/dao/node/parser/ParsingModel.java @@ -80,11 +80,8 @@ enum BlindVoteOutputState { @Nullable private OpReturnType verifiedOpReturnType; - ParsingModel() { - } - - ParsingModel(long availableInputValue) { - this.availableInputValue = availableInputValue; + ParsingModel(TempTx tx) { + this.tx = tx; } public void addToInputValue(long value) { diff --git a/src/main/java/bisq/core/dao/node/parser/TxParser.java b/src/main/java/bisq/core/dao/node/parser/TxParser.java index fb2fb0fe..c490c149 100644 --- a/src/main/java/bisq/core/dao/node/parser/TxParser.java +++ b/src/main/java/bisq/core/dao/node/parser/TxParser.java @@ -78,11 +78,10 @@ public Optional findTx(RawTx rawTx, String genesisTxId, int genesisBlockHeig // If it is not a genesis tx we continue to parse to see if it is a valid BSQ tx. int blockHeight = rawTx.getBlockHeight(); - ParsingModel parsingModel = new ParsingModel(); - TempTx tempTx = TempTx.fromRawTx(rawTx); // We could pass tx also to the sub validators but as long we have not refactored the validators to pure // functions lets use the parsingModel. - parsingModel.setTx(tempTx); + TempTx tempTx = TempTx.fromRawTx(rawTx); + ParsingModel parsingModel = new ParsingModel(tempTx); for (int inputIndex = 0; inputIndex < tempTx.getTxInputs().size(); inputIndex++) { TxInput input = tempTx.getTxInputs().get(inputIndex);