Remove VMTRACE.

Better transaction logging.
Avoid bothering with obviously invalid transactions.
This commit is contained in:
Gav Wood 2015-04-08 02:42:51 +02:00
parent 68b61432ae
commit fff3784c01
3 changed files with 6 additions and 6 deletions

View File

@ -172,7 +172,7 @@ void ImportTest::importTransaction(json_spirit::mObject& _o)
{
RLPStream transactionRLPStream = createRLPStreamFromTransactionFields(_o);
RLP transactionRLP(transactionRLPStream.out());
m_transaction = Transaction(transactionRLP.data(), CheckSignature::Sender);
m_transaction = Transaction(transactionRLP.data(), CheckTransaction::Everything);
}
}

View File

@ -383,7 +383,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
try
{
Transaction t(createRLPStreamFromTransactionFields(tx).out(), CheckSignature::Sender);
Transaction t(createRLPStreamFromTransactionFields(tx).out(), CheckTransaction::Everything);
txsFromField.push_back(t);
}
catch (Exception const& _e)
@ -400,7 +400,7 @@ void doBlockchainTests(json_spirit::mValue& _v, bool _fillin)
RLP root(blockRLP);
for (auto const& tr: root[1])
{
Transaction tx(tr.data(), CheckSignature::Sender);
Transaction tx(tr.data(), CheckTransaction::Everything);
txsFromRlp.push_back(tx);
}

View File

@ -44,7 +44,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
{
bytes stream = importByteArray(o["rlp"].get_str());
RLP rlp(stream);
txFromRlp = Transaction(rlp.data(), CheckSignature::Sender);
txFromRlp = Transaction(rlp.data(), CheckTransaction::Everything);
if (!txFromRlp.signature().isValid())
BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") );
}
@ -64,7 +64,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
BOOST_REQUIRE(o.count("transaction") > 0);
mObject tObj = o["transaction"].get_obj();
Transaction txFromFields(createRLPStreamFromTransactionFields(tObj).out(), CheckSignature::Sender);
Transaction txFromFields(createRLPStreamFromTransactionFields(tObj).out(), CheckTransaction::Everything);
//Check the fields restored from RLP to original fields
BOOST_CHECK_MESSAGE(txFromFields.data() == txFromRlp.data(), "Data in given RLP not matching the Transaction data!");
@ -91,7 +91,7 @@ void doTransactionTests(json_spirit::mValue& _v, bool _fillin)
try
{
Transaction txFromFields(rlpStream.out(), CheckSignature::Sender);
Transaction txFromFields(rlpStream.out(), CheckTransaction::Everything);
if (!txFromFields.signature().isValid())
BOOST_THROW_EXCEPTION(Exception() << errinfo_comment("transaction from RLP signature is invalid") );