From db0763e198ca65ddc90b6d28517b56b4f7bc99c8 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 2 May 2012 02:57:53 -0700 Subject: [PATCH] About half of the trusted path code. --- src/SHAMap.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/SHAMap.h b/src/SHAMap.h index 9ee2ffc96..e664af2f6 100644 --- a/src/SHAMap.h +++ b/src/SHAMap.h @@ -255,7 +255,7 @@ protected: public: // build new map - SHAMap(uint32 seq=0); + SHAMap(uint32 seq = 0); // hold the map stable across operations ScopedLock Lock() const { return ScopedLock(mLock); } @@ -315,6 +315,11 @@ public: bool operator==(const SHAMap& s) { return getHash() == s.getHash(); } + // trusted path operations - prove a particular node is in a particular ledger + std::list > getTrustedPath(const uint256& index); + static std::vector checkTrustedPath(const uint256& ledgerHash, const uint256& leafIndex, + const std::list >& path); + static bool TestSHAMap(); static bool syncTest(); bool deepCompare(SHAMap& other);