fix/improve printf of created tx

This commit is contained in:
Miguel Freitas 2013-07-19 19:54:37 -03:00
parent 1556e436c5
commit 05c7d3f27d

View File

@ -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<unsigned char>((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<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 = CScript() << vector<unsigned char>((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.