These organic stats actually make sense
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
// Copyright (c) 2010 Satoshi Nakamoto
|
// Copyright (c) 2010 Satoshi Nakamoto
|
||||||
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
// Copyright (c) 2009-2014 The Bitcoin Core developers
|
||||||
|
// Copyright (c) 2019 The Hush developers
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@@ -2086,16 +2087,14 @@ UniValue getchaintxstats(const UniValue& params, bool fHelp)
|
|||||||
// Organic tx stats = Raw - Coinbase - DPoW
|
// Organic tx stats = Raw - Coinbase - DPoW
|
||||||
if (nTxDiff > 0) {
|
if (nTxDiff > 0) {
|
||||||
UniValue organic(UniValue::VOBJ);
|
UniValue organic(UniValue::VOBJ);
|
||||||
organic.pushKV("shielded_txrate", ((double)nShieldedTxDiff - blockcount - nNotarizationsDiff ) / nTimeDiff);
|
|
||||||
organic.pushKV("fully_shielded_txrate", ((double)nFullyShieldedTxDiff - blockcount - nNotarizationsDiff ) / nTimeDiff);
|
|
||||||
organic.pushKV("shielding_txrate", ((double)nShieldingTxDiff - blockcount - nNotarizationsDiff ) / nTimeDiff);
|
|
||||||
organic.pushKV("deshielding_txrate", ((double)nDeshieldingTxDiff - blockcount - nNotarizationsDiff ) / nTimeDiff);
|
|
||||||
|
|
||||||
ret.pushKV("shielded_tx_percent", ((double)ORG(nShieldedTxDiff)) / nTxDiff);
|
organic.pushKV("shielded_tx_percent", ((double)nShieldedTxDiff) / ORG(nTxDiff));
|
||||||
ret.pushKV("fully_shielded_tx_percent", ((double)ORG(nFullyShieldedTxDiff)) / nTxDiff);
|
organic.pushKV("fully_shielded_tx_percent", ((double)nFullyShieldedTxDiff) / ORG(nTxDiff));
|
||||||
ret.pushKV("shielding_tx_percent", ((double)ORG(nShieldingTxDiff)) / nTxDiff);
|
organic.pushKV("shielding_tx_percent", ((double)nShieldingTxDiff) / ORG(nTxDiff));
|
||||||
ret.pushKV("deshielding_tx_percent", ((double)ORG(nDeshieldingTxDiff)) / nTxDiff);
|
organic.pushKV("deshielding_tx_percent", ((double)nDeshieldingTxDiff) / ORG(nTxDiff));
|
||||||
ret.pushKV("organic", organic);
|
|
||||||
|
organic.pushKV("txcount", (int) ORG(nTxDiff));
|
||||||
|
organic.pushKV("organic", organic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user