<p><b>@ManfredKarrer</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/175#discussion_r214729896">src/main/java/bisq/core/dao/state/blockchain/Tx.java</a>:</p>
<pre style='color:#555'>> @@ -138,14 +138,12 @@ public TxOutput getLastTxOutput() {
 
 
     /**
-     * OpReturn output might contain the lockTime in case of a LockTx. It has to be the last output.
-     * We store technically the lockTime there as is is stored in the OpReturn data but conceptually we want to provide
-     * it from the transaction.
+     * The locktime is stored in the LOCKUP txOutput, which is the first txOutput.
</pre>
<p>Hm... I am not sure if the first output is a good place here. Technically its the opReturn output, conceptually its the tx (thats why we use a delegate there).</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/175#discussion_r214729973">src/main/java/bisq/core/dao/node/parser/TxParser.java</a>:</p>
<pre style='color:#555'>> @@ -154,6 +158,9 @@ public TxParser(PeriodService periodService,
                     DevEnv.logErrorAndThrowIfDevMode(msg);
                 }
             } else {
+                // TODO(SQ): The transaction has already been parsed here and the individual txouputs are considered
+                // spendable or otherwise correct. Perhaps this check should be done earlier.
+
</pre>
<p>I think you are correct. Should be probably done earlier</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/175#discussion_r214730388">src/main/java/bisq/core/dao/node/parser/TxParser.java</a>:</p>
<pre style='color:#555'>> @@ -115,11 +115,15 @@ public TxParser(PeriodService periodService,
             // We keep the temporary opReturn type in the parsingModel object.
             checkArgument(!outputs.isEmpty(), "outputs must not be empty");
             int lastIndex = outputs.size() - 1;
-            txOutputParser.processOpReturnCandidate(outputs.get(lastIndex));
+            int lastNonOpReturnIndex = lastIndex;
+            if (txOutputParser.processOpReturnCandidate(outputs.get(lastIndex))) {
+                txOutputParser.processTxOutput(true, outputs.get(lastIndex), lastIndex);
</pre>
<p>I am not 100% if that can cause problems. We can discuss tomorrow.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/175#discussion_r214730479">src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> @@ -81,8 +82,9 @@ public void processGenesisTxOutput(TempTx genesisTx) {
         }
     }
 
-    void processOpReturnCandidate(TempTxOutput txOutput) {
+    boolean processOpReturnCandidate(TempTxOutput txOutput) {
</pre>
<p>If we return a boolean we should rename to make that more clear (e.g. isOpReturnCandidate)</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/175#discussion_r214730871">src/main/java/bisq/core/dao/node/parser/TxOutputParser.java</a>:</p>
<pre style='color:#555'>> @@ -164,6 +166,7 @@ private void handleBsqOutput(TempTxOutput txOutput, int index, long txOutputValu
             optionalVoteRevealUnlockStakeOutput = Optional.of(txOutput);
         } else if (isFirstOutput && opReturnTypeCandidate == OpReturnType.LOCKUP) {
             bsqOutput = TxOutputType.LOCKUP;
+            txOutput.setLockTime(lockTime);
</pre>
<p>Why put it in first output? Technically its in opReturn, conceptually in Tx.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq-core/pull/175#pullrequestreview-151844278">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZthChVdmDIlSTKBQ5yMMQvM-mGHs3ks5uXVk6gaJpZM4WX1Ap">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtvWLOIBRetuxKpxDjfhWma_h3Q6fks5uXVk6gaJpZM4WX1Ap.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq-core","title":"bisq-network/bisq-core","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq-core"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ManfredKarrer commented on #175"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq-core/pull/175#pullrequestreview-151844278"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq-core/pull/175#pullrequestreview-151844278",
"url": "https://github.com/bisq-network/bisq-core/pull/175#pullrequestreview-151844278",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@ManfredKarrer commented on 175",
"sections": [
{
"text": "",
"activityTitle": "**Manfred Karrer**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ManfredKarrer",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq-core/pull/175#pullrequestreview-151844278"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 375345193\n}"
}
],
"themeColor": "26292E"
}
]</script>