Fix the need to call setIndex after creating a new SLE.

Finish the ledger skip list code. (Note that this will cause ledger divergence if old code talks to new code.)
This commit is contained in:
JoelKatz
2012-11-08 04:36:15 -08:00
parent f4d951cd67
commit 644aa28e5b
8 changed files with 61 additions and 11 deletions

View File

@@ -39,7 +39,8 @@ SerializedLedgerEntry::SerializedLedgerEntry(const Serializer& s, const uint256&
}
}
SerializedLedgerEntry::SerializedLedgerEntry(LedgerEntryType type) : STObject(sfLedgerEntry), mType(type)
SerializedLedgerEntry::SerializedLedgerEntry(LedgerEntryType type, const uint256& index) :
STObject(sfLedgerEntry), mIndex(index), mType(type)
{
mFormat = LedgerEntryFormat::getLgrFormat(type);
if (mFormat == NULL) throw std::runtime_error("invalid ledger entry type");