diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp index fc48c2f6d..a0dc9f417 100644 --- a/src/consensus/tx_verify.cpp +++ b/src/consensus/tx_verify.cpp @@ -208,16 +208,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fChe bool Consensus::CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& inputs, int nSpendHeight, unsigned flags, CAmount& txfee) { - if (!CheckKevaTransaction (tx, nSpendHeight, inputs, state, flags)) { - return state.Invalid(false, 0, "", "Tx invalid for Kevacoin"); - } - // are the actual inputs available? if (!inputs.HaveInputs(tx)) { return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-missingorspent", false, strprintf("%s: inputs missing/spent", __func__)); } + if (!CheckKevaTransaction (tx, nSpendHeight, inputs, state, flags)) { + return state.Invalid(false, 0, "", "Tx invalid for Kevacoin"); + } + CAmount nValueIn = 0; for (unsigned int i = 0; i < tx.vin.size(); ++i) { const COutPoint &prevout = tx.vin[i].prevout; diff --git a/test/functional/mining_basic.py b/test/functional/mining_basic.py index 569bf7193..42412ec49 100755 --- a/test/functional/mining_basic.py +++ b/test/functional/mining_basic.py @@ -40,7 +40,7 @@ class MiningTest(BitcoinTestFramework): assert_equal(mining_info['chain'], 'regtest') assert_equal(mining_info['currentblocktx'], 0) assert_equal(mining_info['currentblockweight'], 0) - assert_equal(mining_info['difficulty'], Decimal('4.656542373906925E-10')) + assert_equal(mining_info['difficulty'], Decimal('0.0004882738576261828')) assert_equal(mining_info['networkhashps'], Decimal('0.003333333333333334')) assert_equal(mining_info['pooledtx'], 0)