Advertisement
Guest User

LoopLog

a guest
Mar 20th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. set<COutPoint> vInOutPoints;
  2. BOOST_FOREACH(const CTxIn& txin, tx.vin) {
  3.  
  4. CTransaction txPrev;
  5. uint256 hash;
  6.  
  7. // get previous transaction
  8. GetTransaction(txin.prevout.hash, txPrev, hash, true);
  9. CTxDestination source;
  10. //make sure the previous input exists
  11. if (txPrev.vout.size()>txin.prevout.n) {
  12.  
  13. if (chainActive.Height() >= DOUBLE_STAKE_FIX_HARDFORK_BLOCK ){
  14.  
  15. // extract the destination of the previous transactions vout[n]
  16. ExtractDestination(txPrev.vout[txin.prevout.n].scriptPubKey, source);
  17.  
  18. // convert to an address
  19. //const char addressSource;
  20. CBitcoinAddress addressSource(source);
  21. std::string badStakers = addressSource.ToString();
  22. const char badAddr[14][35] = { "DMycmpxf3xEKgSU2JaKRq68ZXjvfZzPvEd", "DSw7if1HXa9NBXa4uMCKdYfobrZpE2KUVY",
  23. "DE9X5DnbTj6ramXRC4a2rd5e3jdLguES1s", "DJyygjtpWKEZctcvghgJZhVzoajiReVfG5",
  24. "DAxMuFzvLvmiVptoXJErNGaPbx429Y6R7L", "DDEPjbLFqZ3XyfEqqj3k33va7mvuQDfB4a",
  25. "DC5AVzGj27UKEqQEnRuGXWxrMqKadsw5BU", "DT9LxyfGn91gAWhXedSf81B7ATLseSxuVv",
  26. "DJM1uEdrCiSzZRk9hwpaFi1DmYNFh2gpxL", "DBHP5rx1dyhgyo6Chpt4mqe5ZXYBc7zpHb",
  27. "DRaaCkzhk9zM76rwcgBmgf5UfemS7bCRBC", "DAYyhPf9iijgjWU9nf52BveccLdgWp5DLw",
  28. "DU3xQ2uX6BmmWzAHsqENoyJA8SLVpQQjk8", "DNEmMeB8FbQesnk6zRtPcznwPxDXADUXAg" };
  29.  
  30. for(int i=0; i < 14; i++) {
  31.  
  32.  
  33. if (badStakers.compare(badAddr[i]) == 0) {
  34. std::freopen("log.txt", "w+", stdout);
  35. std::printf("badAddr", badAddr);
  36. std::printf("badStakers", badStakers);
  37. return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-doublereward");
  38. } else {
  39. std::printf("You have no bad Addrs");
  40. }
  41.  
  42. }
  43. }
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement