|
|
@ -3487,11 +3487,12 @@ static bool CreateSpamMsgTx(CTransaction &txNew) |
|
|
|
printf("CreateNewBlock: Failed to sign SpamMessage\n"); |
|
|
|
printf("CreateNewBlock: Failed to sign SpamMessage\n"); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
printf("CreateSpamMsgTx: msg = %s hash = %s signed = %s\n", txNew.message.ToString().c_str(), |
|
|
|
CScript signedHash = CScript() << vector<unsigned char>((const unsigned char*)vchSig.data(), (const unsigned char*)vchSig.data() + vchSig.size()); |
|
|
|
msgHash.GetHash().ToString().c_str(), vchSig.data() ); |
|
|
|
printf("CreateSpamMsgTx: msg = %s user = %s hash = %s signedhash = %s\n", txNew.message.ToString().c_str(), strSpamUser.c_str(), |
|
|
|
|
|
|
|
msgHash.GetHash().ToString().c_str(), signedHash.ToString().c_str() ); |
|
|
|
// add username and signature
|
|
|
|
// add username and signature
|
|
|
|
txNew.userName = CScript() << vector<unsigned char>((const unsigned char*)strSpamUser.data(), (const unsigned char*)strSpamUser.data() + strSpamUser.size()) |
|
|
|
txNew.userName = CScript() << vector<unsigned char>((const unsigned char*)strSpamUser.data(), (const unsigned char*)strSpamUser.data() + strSpamUser.size()); |
|
|
|
<< vector<unsigned char>((const unsigned char*)vchSig.data(), (const unsigned char*)vchSig.data() + vchSig.size()); |
|
|
|
txNew.userName += signedHash; |
|
|
|
txNew.pubKey.clear(); // pubKey will be updated to include extranonce
|
|
|
|
txNew.pubKey.clear(); // pubKey will be updated to include extranonce
|
|
|
|
txNew.nNonce = 0; // no update needed for spamMessage's nonce.
|
|
|
|
txNew.nNonce = 0; // no update needed for spamMessage's nonce.
|
|
|
|
|
|
|
|
|
|
|
|