fix bug with getimports... Fix miner loop deadlock with staker. Remove annoying pointless prints for staker.

This commit is contained in:
blackjok3r
2019-01-10 16:44:09 +08:00
parent c11f60f532
commit 5cb458b5f2
3 changed files with 14 additions and 12 deletions

View File

@@ -363,7 +363,7 @@ UniValue getimports(const UniValue& params, bool fHelp)
{
if (fHelp || params.size() != 1)
throw runtime_error(
"getmigrates \"hash|height\"\n"
"getimports \"hash|height\"\n"
"\n\n"
"\nResult:\n"
"{\n"
@@ -429,7 +429,7 @@ UniValue getimports(const UniValue& params, bool fHelp)
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
UniValue result(UniValue::VOBJ);
CAmount TotalImported;
CAmount TotalImported = 0;
UniValue imports(UniValue::VARR);
BOOST_FOREACH(const CTransaction&tx, block.vtx)
{
@@ -467,7 +467,7 @@ UniValue getimports(const UniValue& params, bool fHelp)
}
}
result.push_back(Pair("imports", imports));
result.push_back(Pair("TotalImported", ValueFromAmount(TotalImported)));
result.push_back(Pair("TotalImported", TotalImported > 0 ? ValueFromAmount(TotalImported) : 0 ));
result.push_back(Pair("time", block.GetBlockTime()));
return result;
}