From ba3968f6ce0459f0c0a767e4f54e7cb2c48955d9 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 14 Jan 2017 13:29:08 +0000 Subject: rct: split rct checks between semantics and other Semantics can be checked early --- src/cryptonote_core/blockchain.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/cryptonote_core/blockchain.cpp') diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index de3af8e02..00068467e 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2333,10 +2333,7 @@ bool Blockchain::expand_transaction_2(transaction &tx, const crypto::hash &tx_pr CHECK_AND_ASSERT_MES(false, false, "Unsupported rct tx type: " + boost::lexical_cast(rv.type)); } - // outPk - CHECK_AND_ASSERT_MES(rv.outPk.size() == tx.vout.size(), false, "Bad outPk size"); - for (size_t n = 0; n < tx.rct_signatures.outPk.size(); ++n) - rv.outPk[n].dest = rct::pk2rct(boost::get(tx.vout[n].target).key); + // outPk was already done by handle_incoming_tx return true; } @@ -2641,7 +2638,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } } - if (!rct::verRctSimple(rv)) + if (!rct::verRctSimple(rv, false)) { LOG_PRINT_L1("Failed to check ringct signatures!"); return false; @@ -2699,7 +2696,7 @@ bool Blockchain::check_tx_inputs(transaction& tx, tx_verification_context &tvc, } } - if (!rct::verRct(rv)) + if (!rct::verRct(rv, false)) { LOG_PRINT_L1("Failed to check ringct signatures!"); return false; -- cgit v1.2.3