Small changes to support new transaction serialization code.

This commit is contained in:
JoelKatz
2012-09-28 19:12:07 -07:00
parent 64231daadb
commit 3f0c87588e
2 changed files with 3 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ Transaction::Transaction(const SerializedTransaction::pointer& sit, bool bValida
{
try
{
mFromPubKey.setAccountPublic(mTransaction->peekSigningPubKey());
mFromPubKey.setAccountPublic(mTransaction->getSigningPubKey());
mTransactionID = mTransaction->getTransactionID();
mAccountFrom = mTransaction->getSourceAccount();
}
@@ -92,12 +92,7 @@ bool Transaction::sign(const NewcoinAddress& naAccountPrivate)
Log(lsWARNING) << "No private key for signing";
bResult = false;
}
else if (!getSTransaction()->sign(naAccountPrivate))
{
Log(lsWARNING) << "Failed to make signature";
assert(false);
bResult = false;
}
getSTransaction()->sign(naAccountPrivate);
if (bResult)
{

View File

@@ -105,7 +105,7 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
NewcoinAddress naSigningPubKey;
if (tesSUCCESS == terResult)
naSigningPubKey = NewcoinAddress::createAccountPublic(txn.peekSigningPubKey());
naSigningPubKey = NewcoinAddress::createAccountPublic(txn.setSigningPubKey());
// Consistency: really signed.
if ((tesSUCCESS == terResult) && !isSetBit(params, tapNO_CHECK_SIGN) && !txn.checkSign(naSigningPubKey))