From 96b314c78cd9f22704ab6de59a5ef8af6396d74d Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 9 Jul 2012 18:01:52 -0700 Subject: [PATCH] Add getQualityNext. --- src/Ledger.h | 1 + src/LedgerIndex.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/Ledger.h b/src/Ledger.h index 41ac04b86e..9811a83516 100644 --- a/src/Ledger.h +++ b/src/Ledger.h @@ -233,6 +233,7 @@ public: // static uint256 getQualityIndex(const uint256& uBase, const uint64 uNodeDir=0); + static uint256 getQualityNext(const uint256& uBase); // // Ripple functions : credit lines diff --git a/src/LedgerIndex.cpp b/src/LedgerIndex.cpp index 0d2071a0ff..79ec76bd33 100644 --- a/src/LedgerIndex.cpp +++ b/src/LedgerIndex.cpp @@ -15,6 +15,17 @@ uint256 Ledger::getQualityIndex(const uint256& uBase, const uint64 uNodeDir) return uNode; } +uint256 Ledger::getQualityNext(const uint256& uBase) +{ + static uint256 uNext("10000000000000000"); + + uint256 uResult = uBase; + + uResult += uNext; + + return uResult; +} + uint256 Ledger::getAccountRootIndex(const uint160& uAccountID) { Serializer s(22);