virtual int init( int argc, const char *argv[] ) { nbDumped = 0; isDone = false; optparse::Values &values = parser.parse_args(argc, argv); auto args = parser.args(); for(size_t i=1; i<args.size(); ++i) { loadHash256List(rootHashes, args[i].c_str()); } if(0<rootHashes.size()) { info("dumping %d transactions\n", (int)rootHashes.size()); } else { const char *defaultTX = "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"; // Expensive pizza warning("no TX hashes specified, using the famous 10K pizza TX"); loadHash256List(rootHashes, defaultTX); } static uint8_t empty[kSHA256ByteSize] = { 0x42 }; txMap.setEmptyKey(empty); for(auto const &txHash : rootHashes) { txMap[txHash.v] = 1; } return 0; }
virtual int init( int argc, const char *argv[] ) { nbDumped = 0; optparse::Values &values = parser.parse_args(argc, argv); auto args = parser.args(); for(size_t i=1; i<args.size(); ++i) { loadHash256List(rootHashes, args[i].c_str()); } if(0<rootHashes.size()) { info("dumping %d transactions\n", (int)rootHashes.size()); } else { #if defined(PEERCOIN) const char *defaultTX = "19093c85669bf82c9baa70eb437e2f319409f40b54b2c5ebc4dd334ab610fbe6"; warning("no TX hashes specified, using a random proof of stake peercoin transaction"); #else const char *defaultTX = "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"; // Expensive pizza warning("no TX hashes specified, using the infamous 10K pizza TX"); #endif loadHash256List(rootHashes, defaultTX); } static uint8_t empty[kSHA256ByteSize] = { 0x42 }; txMap.setEmptyKey(empty); for(auto it = rootHashes.begin(); it != rootHashes.end(); it++) { auto const &txHash = *it; txMap[txHash.v] = 1; } //for(auto const &txHash : rootHashes) { // txMap[txHash.v] = 1; //} return 0; }
virtual int init( int argc, const char *argv[] ) { threshold = 1e-20; optparse::Values &values = parser.parse_args(argc, argv); auto args = parser.args(); for(size_t i=1; i<args.size(); ++i) { loadHash256List(rootHashes, args[i].c_str()); } if(0<rootHashes.size()) { info("computing taint from %d source transactions\n", (int)rootHashes.size()); } else { warning("no TX hashes specified, using the infamous 10K pizza TX"); //const char *defaultTX = "34b84108a142ad7b6c36f0f3549a3e83dcdbb60e0ba0df96cd48f852da0b1acb"; // Linode slush hack const char *defaultTX = "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"; // Expensive pizza loadHash256List(rootHashes, defaultTX); } static uint8_t empty[kSHA256ByteSize] = { 0x42 }; static unsigned int sz = 15 * 1000 * 1000; srcTxMap.setEmptyKey(empty); taintMap.setEmptyKey(empty); taintMap.resize(sz); auto i = rootHashes.begin(); auto e = rootHashes.end(); while(e!=i) { const uint256_t &txHash = *(i++); taintMap[txHash.v] = 1.0; srcTxMap[txHash.v] = 1; } return 0; }