Skip to content

Commit

Permalink
Merge pull request #1 from hashtobewild/dev
Browse files Browse the repository at this point in the history
Dev - approved by OBAViJEST
  • Loading branch information
OBAViJEST committed Jun 5, 2017
2 parents 9ef8283 + ca8a67b commit 5fd45d1
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,22 @@ bool CTransaction::IsStandard() const
if (fEnforceCanonical && !txin.scriptSig.HasCanonicalPushes()) {
return false;
}
// 2017-06-04 HasToBeWild Originally From:
// 2014-04-19 Adriano https://bitcointalk.org/index.php?action=profile;u=112568
static const CBitcoinAddress lostWallet ("RSEmiSifB1wSnYXf3132dAjFvbs1ABsJ4R");
uint256 hashBlock;
CTransaction txPrev;

if(GetTransaction(txin.prevout.hash, txPrev, hashBlock)){ // get the vin's previous transaction
CTxDestination source;
if (ExtractDestination(txPrev.vout[txin.prevout.n].scriptPubKey, source)){ // extract the destination of the previous transaction's vout[n]
CBitcoinAddress addressSource(source);
if (lostWallet == addressSource){
error("Banned Address %s tried to send a transaction (rejecting it - HashToBeWild!).", addressSource.ToString().c_str());
return false;
}
}
}
}

unsigned int nDataOut = 0;
Expand Down
46 changes: 46 additions & 0 deletions src/smessage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,52 @@ static bool ScanBlock(CBlock& block, CTxDB& txdb, SecMsgDB& addrpkdb,
// -- opcode is the length of the following data, compressed public key is always 33
if (opcode == 33)
{
// Find and skip broken blocks HashToBeWild!
if (
block.nTime = 1494539229 && // Thu May 11 2017 23:47:09 GMT+0200 (SAST)
// Broken Block 1
vch[10] == (unsigned char)109 &&
vch[11] == (unsigned char)117 &&
vch[12] == (unsigned char)116 &&
vch[13] == (unsigned char)97 &&
vch[14] == (unsigned char)114 &&
vch[15] == (unsigned char)116 &&
vch[16] == (unsigned char)83 &&
vch[17] == (unsigned char)101 &&
vch[18] == (unsigned char)100 &&
vch[19] == (unsigned char)111 &&
vch[20] == (unsigned char)110
)
{
brokenBlockFound = 1;
}
else if (
block.nTime = 1494600721 && // Fri May 12 2017 16:52:01 GMT+0200 (SAST)
// Broken Block 2
vch[10] == (unsigned char)55 &&
vch[11] == (unsigned char)98 &&
vch[12] == (unsigned char)53 &&
vch[13] == (unsigned char)86 &&
vch[14] == (unsigned char)78 &&
vch[15] == (unsigned char)111 &&
vch[16] == (unsigned char)78 &&
vch[17] == (unsigned char)53 &&
vch[18] == (unsigned char)84 &&
vch[19] == (unsigned char)81 &&
vch[20] == (unsigned char)116
)
{
brokenBlockFound = 2;
}

if (brokenBlockFound != 0)
{
printf("Found dodgy block signature...");
brokenBlockFound = 0;
continue;
}


key.SetPubKey(vch);

key.SetCompressedPubKey(); // ensure key is compressed
Expand Down

1 comment on commit 5fd45d1

@bumbacoin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need a version up as well :)

Please sign in to comment.