Mining test cases passed.

This commit is contained in:
Jianping Wu 2019-02-07 18:07:51 -08:00
parent 0c6a908f7c
commit 4c92689288
2 changed files with 5 additions and 5 deletions

View File

@ -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;

View File

@ -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)