Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
Arthur Britto
2012-07-20 14:16:48 -07:00
3 changed files with 3 additions and 2 deletions

View File

@@ -717,7 +717,7 @@ void LedgerConsensus::Saccept(boost::shared_ptr<LedgerConsensus> This, SHAMap::p
void LedgerConsensus::applyTransaction(TransactionEngine& engine, SerializedTransaction::pointer txn,
Ledger::pointer ledger, CanonicalTXSet& failedTransactions, bool final)
{
TransactionEngineParams parms = final ? (tepNO_CHECK_FEE | tepUPDATE_TOTAL) : tepNONE;
TransactionEngineParams parms = final ? (tepNO_CHECK_FEE | tepUPDATE_TOTAL | tepMETADATA) : tepNONE;
#ifndef TRUST_NETWORK
try
{

View File

@@ -864,7 +864,7 @@ TransactionEngineResult TransactionEngine::applyTransaction(const SerializedTran
naSigningPubKey = NewcoinAddress::createAccountPublic(txn.peekSigningPubKey());
// Consistency: really signed.
if (terSUCCESS == terResult && !txn.checkSign(naSigningPubKey))
if ((terSUCCESS == terResult) && ((params & tepNO_CHECK_SIGN) == 0) && !txn.checkSign(naSigningPubKey))
{
Log(lsWARNING) << "applyTransaction: Invalid transaction: bad signature";

View File

@@ -88,6 +88,7 @@ enum TransactionEngineParams
tepNO_CHECK_SIGN = 1, // Signature already checked
tepNO_CHECK_FEE = 2, // It was voted into a ledger anyway
tepUPDATE_TOTAL = 4, // Update the total coins
tepMETADATA = 5, // put metadata in tree, not transaction
};
enum TransactionAccountAction