diff --git a/src/cc/dilithium.c b/src/cc/dilithium.c index d4b75bf38..7ab6b4c37 100644 --- a/src/cc/dilithium.c +++ b/src/cc/dilithium.c @@ -3352,7 +3352,7 @@ int64_t dilithium_inputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPu { if ( (nValue= IsCClibvout(cp,vintx,vout,cmpaddr)) > DILITHIUM_TXFEE && myIsutxo_spentinmempool(ignoretxid,ignorevin,txid,vout) == 0 ) { - if ( (dilithium_Qsendopretdecode(checktxid,tmpsig,voutpubtxids,vintx.vout[numvouts-1].scriptPubKey) == 'Q' || dilithium_sendopretdecode(checktxid,vintx.vout[numvouts-1].scriptPubKey) == 'x') && destpubtxid == checktxid ) + if ( (dilithium_Qsendopretdecode(checktxid,tmpsig,voutpubtxids,vintx.vout[numvouts-1].scriptPubKey) == 'Q' && vout < voutpubtxids.size() && checktxid == voutpubtxids[vout]) || (dilithium_sendopretdecode(checktxid,vintx.vout[numvouts-1].scriptPubKey) == 'x' && destpubtxid == checktxid) ) { if ( total != 0 && maxinputs != 0 ) mtx.vin.push_back(CTxIn(txid,vout,CScript())); diff --git a/src/cc/maketetris b/src/cc/maketetris new file mode 100755 index 000000000..9c2a005a0 --- /dev/null +++ b/src/cc/maketetris @@ -0,0 +1,2 @@ +gcc -O3 -std=c++11 -I../secp256k1/include -I../univalue/include -I../cryptoconditions/include -I../cryptoconditions/src -I../cryptoconditions/src/asn -I.. -I. -DSTANDALONE tetris.cpp -lncurses -o tetris + diff --git a/src/cc/tetris.cpp b/src/cc/tetris.cpp index 254c9b135..d6ae473fe 100644 --- a/src/cc/tetris.cpp +++ b/src/cc/tetris.cpp @@ -858,7 +858,7 @@ int main(int argc, char **argv) next = newwin(6, 10, 0, 2 * (tg->cols + 1) + 1); hold = newwin(6, 10, 7, 2 * (tg->cols + 1) + 1); score = newwin(6, 10, 14, 2 * (tg->cols + 1 ) + 1); - + int32_t counter = 0; // Game loop while (running) { running = tg_tick(tg, move); @@ -866,7 +866,8 @@ int main(int argc, char **argv) display_piece(next, tg->next); display_piece(hold, tg->stored); display_score(score, tg); - doupdate(); + if ( (counter++ % 5) == 0 ) + doupdate(); sleep_milli(10); switch (getch()) {