Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set<COutPoint> vInOutPoints;
- BOOST_FOREACH(const CTxIn& txin, tx.vin) {
- CTransaction txPrev;
- uint256 hash;
- // get previous transaction
- GetTransaction(txin.prevout.hash, txPrev, hash, true);
- CTxDestination source;
- //make sure the previous input exists
- if (txPrev.vout.size()>txin.prevout.n) {
- if (chainActive.Height() >= DOUBLE_STAKE_FIX_HARDFORK_BLOCK ){
- // extract the destination of the previous transactions vout[n]
- ExtractDestination(txPrev.vout[txin.prevout.n].scriptPubKey, source);
- // convert to an address
- //const char addressSource;
- CBitcoinAddress addressSource(source);
- std::string badStakers = addressSource.ToString();
- const char badAddr[14][35] = { "DMycmpxf3xEKgSU2JaKRq68ZXjvfZzPvEd", "DSw7if1HXa9NBXa4uMCKdYfobrZpE2KUVY",
- "DE9X5DnbTj6ramXRC4a2rd5e3jdLguES1s", "DJyygjtpWKEZctcvghgJZhVzoajiReVfG5",
- "DAxMuFzvLvmiVptoXJErNGaPbx429Y6R7L", "DDEPjbLFqZ3XyfEqqj3k33va7mvuQDfB4a",
- "DC5AVzGj27UKEqQEnRuGXWxrMqKadsw5BU", "DT9LxyfGn91gAWhXedSf81B7ATLseSxuVv",
- "DJM1uEdrCiSzZRk9hwpaFi1DmYNFh2gpxL", "DBHP5rx1dyhgyo6Chpt4mqe5ZXYBc7zpHb",
- "DRaaCkzhk9zM76rwcgBmgf5UfemS7bCRBC", "DAYyhPf9iijgjWU9nf52BveccLdgWp5DLw",
- "DU3xQ2uX6BmmWzAHsqENoyJA8SLVpQQjk8", "DNEmMeB8FbQesnk6zRtPcznwPxDXADUXAg" };
- for(int i=0; i < 14; i++) {
- if (badStakers.compare(badAddr[i]) == 0) {
- std::freopen("log.txt", "w+", stdout);
- std::printf("badAddr", badAddr);
- std::printf("badStakers", badStakers);
- return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-doublereward");
- } else {
- std::printf("You have no bad Addrs");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement