From 00f1b19d62d657148cc21afc73ceb8388c6afdfc Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 6 Mar 2019 21:19:53 -1100 Subject: [PATCH] Fix Qsend spend of Qsend --- src/cc/dilithium.c | 4 ++-- src/cc/rogue/main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index b92102f22..d4b75bf38 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -3463,9 +3463,9 @@ bool dilithium_Qvalidate(struct CCcontract_info *cp,int32_t height,Eval *eval,co { if ( dilithium_Qsendopretdecode(tmptxid,tmpsig,voutpubtxids,vintx.vout[numvouts-1].scriptPubKey) != 'Q' ) return eval->Invalid("couldnt decode destpubtxid from Qsend"); - else if ( vintx.vin[i].prevout.n > voutpubtxids.size() ) + else if ( tx.vin[i].prevout.n > voutpubtxids.size() ) return eval->Invalid("no destpubtxid for prevout.n"); - destpubtxid = voutpubtxids[vintx.vin[i].prevout.n]; + destpubtxid = voutpubtxids[tx.vin[i].prevout.n]; } else { diff --git a/src/cc/rogue/main.c b/src/cc/rogue/main.c index df7c6481a..c2155a085 100644 --- a/src/cc/rogue/main.c +++ b/src/cc/rogue/main.c @@ -716,7 +716,7 @@ int32_t rogue_sendrawtransaction(char *rawtx) sprintf(params,"[\"%s\"]",rawtx); if ( (retstr= komodo_issuemethod(USERPASS,"sendrawtransaction",params,ROGUE_PORT)) != 0 ) { - if ( 0 ) + if ( 0 ) // causes 4th level crash { static FILE *fp; if ( fp == 0 )