Skip to content

Commit

Permalink
Fix script reference bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamlabs authored and janmazak committed Aug 10, 2022
1 parent 84b2c5a commit 90b5001
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/signTxOutput.c
Expand Up @@ -449,9 +449,8 @@ static void parseTopLevelData(const uint8_t* wireDataBuffer, size_t wireDataSize
subctx->includeDatum = signTx_parseIncluded(parse_u1be(&view));
TRACE("includeDatum = %d", (int) subctx->includeDatum);

// TODO should be allowed
// subctx->includeRefScript = signTx_parseIncluded(parse_u1be(&view));
// TRACE("includeRefScript = %d", (int) subctx->includeRefScript);
subctx->includeRefScript = signTx_parseIncluded(parse_u1be(&view));
TRACE("includeRefScript = %d", (int) subctx->includeRefScript);

if (subctx->includeDatum || subctx->includeRefScript) {
// it's easier to verify all Plutus-related things via txid all at once
Expand Down Expand Up @@ -1195,7 +1194,7 @@ static void handleRefScriptAPDU(const uint8_t* wireDataBuffer, size_t wireDataSi
TRACE("Adding reference script to tx hash");
txHashBuilder_addOutput_referenceScript(
&BODY_CTX->txHashBuilder,
subctx->stateData.datumRemainingBytes
subctx->stateData.refScriptRemainingBytes
);
txHashBuilder_addOutput_referenceScript_dataChunk(
&BODY_CTX->txHashBuilder,
Expand Down

0 comments on commit 90b5001

Please sign in to comment.