Skip to content

Commit

Permalink
Only reference commit script if spending commits in abort
Browse files Browse the repository at this point in the history
This was failing with PPViewHashesDontMatch because the transaction was
referencing the commit script which is does not always need, and the
commit script being of different version than the other scripts spent.
  • Loading branch information
ch1bo committed Oct 4, 2024
1 parent ea6168b commit 5d585d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hydra-tx/src/Hydra/Tx/Abort.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ abortTx committedUTxO scriptRegistry vk (headInput, initialHeadOutput) headToken
unsafeBuildTransaction $
emptyTxBody
& addInputs ((headInput, headWitness) : initialInputs <> commitInputs)
& addReferenceInputs [initialScriptRef, commitScriptRef, headScriptRef]
& addReferenceInputs ([headScriptRef, initialScriptRef] <> [commitScriptRef | not $ null commitInputs])
& addOutputs reimbursedOutputs
& burnTokens headTokenScript Burn headTokens
& addExtraRequiredSigners [verificationKeyHash vk]
Expand Down

0 comments on commit 5d585d4

Please sign in to comment.