mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Ledger consensus stuff.
This commit is contained in:
@@ -87,6 +87,28 @@ bool TransactionAcquire::takeNodes(const std::list<SHAMapNode>& nodeIDs,
|
||||
return true;
|
||||
}
|
||||
|
||||
LedgerConsensus::LedgerConsensus(Ledger::pointer previousLedger)
|
||||
: mState(lcsPRE_CLOSE), mPreviousLedger(previousLedger)
|
||||
{
|
||||
}
|
||||
|
||||
void LedgerConsensus::closeTime(Ledger::pointer& current)
|
||||
{
|
||||
if (mState != lcsPRE_CLOSE)
|
||||
{
|
||||
assert(false);
|
||||
return;
|
||||
}
|
||||
CKey::pointer nodePrivKey = boost::make_shared<CKey>();
|
||||
nodePrivKey->MakeNewKey(); // FIXME
|
||||
|
||||
current->updateHash();
|
||||
uint256 txSet = current->getTransHash();
|
||||
mOurPosition = boost::make_shared<LedgerProposal>(nodePrivKey, current->getParentHash(), txSet);
|
||||
mComplete[txSet] = current->peekTransactionMap()->snapShot();
|
||||
// WRITME: Broadcast an IHAVE for this set
|
||||
}
|
||||
|
||||
void LedgerConsensus::abort()
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user