From fff3784c010925a543f6bc7df803f7a107f3964b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Wed, 8 Apr 2015 02:42:51 +0200 Subject: [PATCH] Remove VMTRACE. Better transaction logging. Avoid bothering with obviously invalid transactions. --- TestHelper.cpp | 2 +- blockchain.cpp | 4 ++-- transaction.cpp | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TestHelper.cpp b/TestHelper.cpp index dd7c09eab..757a6e7a6 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -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); } } diff --git a/blockchain.cpp b/blockchain.cpp index a223e8d4e..6c1cfebd6 100644 --- a/blockchain.cpp +++ b/blockchain.cpp @@ -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); } diff --git a/transaction.cpp b/transaction.cpp index 4c57326ba..7aa073f29 100644 --- a/transaction.cpp +++ b/transaction.cpp @@ -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") );