About half of the trusted path code.

This commit is contained in:
JoelKatz
2012-05-02 02:57:53 -07:00
parent ede296475b
commit db0763e198

View File

@@ -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<std::vector<unsigned char> > getTrustedPath(const uint256& index);
static std::vector<unsigned char> checkTrustedPath(const uint256& ledgerHash, const uint256& leafIndex,
const std::list<std::vector<unsigned char> >& path);
static bool TestSHAMap();
static bool syncTest();
bool deepCompare(SHAMap& other);