Add support for generator map ledger entries.

This commit is contained in:
Arthur Britto
2012-05-12 18:29:46 -07:00
parent 0e898e3d6a
commit d761f4c451
4 changed files with 54 additions and 23 deletions

View File

@@ -1,13 +1,6 @@
#include "Ledger.h"
uint256 Ledger::getAccountRootIndex(const uint160& accountID)
{ // Index is accountID extended to 256 bits
uint256 index;
memcpy(index.begin() + (index.size() - accountID.size()), accountID.begin(), accountID.size());
return index;
}
uint256 Ledger::getRippleIndex(const uint160& accountID, const uint160& extendTo, const uint160& currency)
{ // Index is 160-bit account credit extended to, 96-bit XOR of extending account and currency
uint256 base=getAccountRootIndex(extendTo);