From d3962718aaa2e833ab64548d6308f367b2ca0ed1 Mon Sep 17 00:00:00 2001 From: wilsonianb Date: Mon, 14 Mar 2016 12:15:21 -0700 Subject: [PATCH] Mark validations as full or partial: Set kFullFlag in STValidation constructor and include validation type (full or partial) in subscription stream. --- src/ripple/app/ledger/impl/LedgerConsensusImp.cpp | 2 +- src/ripple/app/misc/NetworkOPs.cpp | 1 + src/ripple/protocol/impl/STValidation.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp index daf6a10b9..31312b507 100644 --- a/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp +++ b/src/ripple/app/ledger/impl/LedgerConsensusImp.cpp @@ -201,7 +201,7 @@ checkConsensus ( } } - // Have we, together with the nodes on our UNL list, reached the treshold + // Have we, together with the nodes on our UNL list, reached the threshold // to declare consensus? if (checkConsensusReached (currentAgree, currentProposers, proposing)) { diff --git a/src/ripple/app/misc/NetworkOPs.cpp b/src/ripple/app/misc/NetworkOPs.cpp index 70dd4394b..c7b4ac962 100644 --- a/src/ripple/app/misc/NetworkOPs.cpp +++ b/src/ripple/app/misc/NetworkOPs.cpp @@ -1623,6 +1623,7 @@ void NetworkOPsImp::pubValidation (STValidation::ref val) val->getSignerPublic()); jvObj [jss::ledger_hash] = to_string (val->getLedgerHash ()); jvObj [jss::signature] = strHex (val->getSignature ()); + jvObj [jss::full] = val->isFull(); auto const seq = *(*val)[~sfLedgerSequence]; diff --git a/src/ripple/protocol/impl/STValidation.cpp b/src/ripple/protocol/impl/STValidation.cpp index 48635be7d..24654c967 100644 --- a/src/ripple/protocol/impl/STValidation.cpp +++ b/src/ripple/protocol/impl/STValidation.cpp @@ -57,7 +57,7 @@ STValidation::STValidation ( mNodeID = calcNodeID(publicKey); assert (mNodeID.isNonZero ()); - if (!isFull) + if (isFull) setFlag (kFullFlag); }