From f0ee52a94ded338f8209e9c97420abd997f52716 Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 6 Apr 2023 12:44:37 -0400 Subject: [PATCH] Remove dead code --- src/hush_gateway.h | 94 +--------------------------------------------- src/hush_globals.h | 1 - 2 files changed, 1 insertion(+), 94 deletions(-) diff --git a/src/hush_gateway.h b/src/hush_gateway.h index 0002e69a9..8be1f7c39 100644 --- a/src/hush_gateway.h +++ b/src/hush_gateway.h @@ -624,38 +624,6 @@ int32_t hush_gateway_deposits(CMutableTransaction *txNew,char *base,int32_t toko return(0); } -const char *banned_txids[] = -{ - "78cb4e21245c26b015b888b14c4f5096e18137d2741a6de9734d62b07014dfca", // vout1 only 233559 - "00697be658e05561febdee1aafe368b821ca33fbb89b7027365e3d77b5dfede5", //234172 - "e909465788b32047c472d73e882d79a92b0d550f90be008f76e1edaee6d742ea", //234187 - "f56c6873748a327d0b92b8108f8ec8505a2843a541b1926022883678fb24f9dc", //234188 - "abf08be07d8f5b3a433ddcca7ef539e79a3571632efd6d0294ec0492442a0204", //234213 - "3b854b996cc982fba8c06e76cf507ae7eed52ab92663f4c0d7d10b3ed879c3b0", //234367 - "fa9e474c2cda3cb4127881a40eb3f682feaba3f3328307d518589024a6032cc4", //234635 - "ca746fa13e0113c4c0969937ea2c66de036d20274efad4ce114f6b699f1bc0f3", //234662 - "43ce88438de4973f21b1388ffe66e68fda592da38c6ef939be10bb1b86387041", //234697 - "0aeb748de82f209cd5ff7d3a06f65543904c4c17387c9d87c65fd44b14ad8f8c", //234899 - "bbd3a3d9b14730991e1066bd7c626ca270acac4127131afe25f877a5a886eb25", //235252 - "fa9943525f2e6c32cbc243294b08187e314d83a2870830180380c3c12a9fd33c", //235253 - "a01671c8775328a41304e31a6693bbd35e9acbab28ab117f729eaba9cb769461", //235265 - "2ef49d2d27946ad7c5d5e4ab5c089696762ff04e855f8ab48e83bdf0cc68726d", //235295 - "c85dcffb16d5a45bd239021ad33443414d60224760f11d535ae2063e5709efee", //235296 - // all vouts banned - "c4ea1462c207547cd6fb6a4155ca6d042b22170d29801a465db5c09fec55b19d", //246748 - "305dc96d8bc23a69d3db955e03a6a87c1832673470c32fe25473a46cc473c7d1", //247204 - //"43416a0c4da6b1a5c1d375bdbe8f7dc8d44d8f60df593d3376aa8221ec66357e", // vout0 only - //"1eb295ed54c47f35cbccd7e7e40d03041f1853581da6d41102a9d8813782b6cb", - //"db121e4012222adfc841824984a2a90b7e5b018dd71307822537d58160195e43", - //"28f95b8148ac4ae6e09c7380e34422fab41d568a411e53dc94823e36a3d6f386", - //"01d8c839463bda2f2f6400ede4611357913684927a767422a8560ead1b22557c", - //"6e4980a9e1bd669f4df04732dc6f11b7773b6de88d1abcf89a6b9007d72ef9ac", - //"6cc1d0495170bc0e11fd3925297623562e529ea1336b66ea61f8a1159041aed2", - //"250875424cece9bcd98cb226b09da7671625633d6958589e3a462bad89ad87cc", // missed - //"ea8659011de52f4dac42cda12326064b7b5013b8492f88e33159884ca299aa05", // missed - //"ce567928b5490a17244167af161b1d8dd6ff753fef222fe6855d95b2278a35b3", // missed -}; - int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts) { if ( k < indallvouts ) @@ -665,29 +633,12 @@ int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts) else return(vout == 0); } -int32_t hush_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max) -{ - int32_t i; - if ( sizeof(banned_txids)/sizeof(*banned_txids) > max ) - { - fprintf(stderr,"hush_bannedset: buffer too small %d vs %d\n",(int32_t)(sizeof(banned_txids)/sizeof(*banned_txids)),max); - StartShutdown(); - } - for (i=0; i 1 && block.vtx[txn_count-1].vout.size() > 0 && block.vtx[txn_count-1].vout[0].nValue == 5000 ) - { - /* - if ( block.vtx[txn_count-1].vin.size() == 1 && GetTransaction(block.vtx[txn_count-1].vin[0].prevout.hash,tx,hash,false) && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey ) - notmatched = 1; - */ - if ( block.vtx[txn_count-1].vin.size() == 1 ) { - uint256 hashNotaryProofVin = block.vtx[txn_count-1].vin[0].prevout.hash; - int fNotaryProofVinTxFound = GetTransaction(hashNotaryProofVin,tx,hash,false); - if (!fNotaryProofVinTxFound) { - // try to search in the same block - BOOST_FOREACH(const CTransaction &txInThisBlock, block.vtx) { - if (txInThisBlock.GetHash() == hashNotaryProofVin) { - fNotaryProofVinTxFound = 1; - tx = txInThisBlock; - hash = block.GetHash(); - break; - } - } - } - if ( fNotaryProofVinTxFound && block.vtx[0].vout[0].scriptPubKey == tx.vout[block.vtx[txn_count-1].vin[0].prevout.n].scriptPubKey ) - { - notmatched = 1; - } - } - } - n = block.vtx[i].vin.size(); - for (j=0; j= indallvouts) ) - { - printf("banned tx.%d being used at ht.%d txi.%d vini.%d\n",k,height,i,j); - return(-1); - } - } - } - } - } + if ( SMART_CHAIN_SYMBOL[0] == 0 || ((ASSETCHAINS_COMMISSION != 0 || ASSETCHAINS_FOUNDERS_REWARD) && height > 1) || NetworkUpgradeActive(height, Params().GetConsensus(), Consensus::UPGRADE_SAPLING) ) diff --git a/src/hush_globals.h b/src/hush_globals.h index 9bfb59302..4ac3060b6 100644 --- a/src/hush_globals.h +++ b/src/hush_globals.h @@ -30,7 +30,6 @@ int32_t hush_isrealtime(int32_t *hushheightp); uint64_t hush_paxtotal(); int32_t hush_longestchain(); uint64_t hush_maxallowed(int32_t baseid); -int32_t hush_bannedset(int32_t *indallvoutsp,uint256 *array,int32_t max); int32_t hush_checkvout(int32_t vout,int32_t k,int32_t indallvouts); pthread_mutex_t hush_mutex;