diff --git a/src/main.cpp b/src/main.cpp index 0616ffe2..91661fbe 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3487,11 +3487,12 @@ static bool CreateSpamMsgTx(CTransaction &txNew) printf("CreateNewBlock: Failed to sign SpamMessage\n"); return false; } - printf("CreateSpamMsgTx: msg = %s hash = %s signed = %s\n", txNew.message.ToString().c_str(), - msgHash.GetHash().ToString().c_str(), vchSig.data() ); + CScript signedHash = CScript() << vector((const unsigned char*)vchSig.data(), (const unsigned char*)vchSig.data() + vchSig.size()); + 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 - txNew.userName = CScript() << vector((const unsigned char*)strSpamUser.data(), (const unsigned char*)strSpamUser.data() + strSpamUser.size()) - << vector((const unsigned char*)vchSig.data(), (const unsigned char*)vchSig.data() + vchSig.size()); + txNew.userName = CScript() << vector((const unsigned char*)strSpamUser.data(), (const unsigned char*)strSpamUser.data() + strSpamUser.size()); + txNew.userName += signedHash; txNew.pubKey.clear(); // pubKey will be updated to include extranonce txNew.nNonce = 0; // no update needed for spamMessage's nonce.