Add a persistent screen showing basic node metrics

The screen is implemented using ANSI Escape sequences.

Closes #1331
This commit is contained in:
Jack Grigg
2016-09-04 04:39:45 +12:00
parent f39d176ebf
commit a6df7ab567
7 changed files with 204 additions and 3 deletions

View File

@@ -16,6 +16,7 @@
#include "consensus/validation.h"
#include "init.h"
#include "merkleblock.h"
#include "metrics.h"
#include "net.h"
#include "pow.h"
#include "txdb.h"
@@ -833,6 +834,11 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
bool CheckTransaction(const CTransaction& tx, CValidationState &state)
{
// Don't count coinbase transactions because mining skews the count
if (!tx.IsCoinBase()) {
transactionsValidated.increment();
}
if (!CheckTransactionWithoutProofVerification(tx, state)) {
return false;
} else {