mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
If we get a ledger from the SQL database, it must be closed.
This commit is contained in:
@@ -529,6 +529,7 @@ Ledger::pointer Ledger::getSQL(const std::string& sql)
|
|||||||
// Log(lsTRACE) << "Constructing ledger " << ledgerSeq << " from SQL";
|
// Log(lsTRACE) << "Constructing ledger " << ledgerSeq << " from SQL";
|
||||||
Ledger::pointer ret = boost::make_shared<Ledger>(prevHash, transHash, accountHash, totCoins,
|
Ledger::pointer ret = boost::make_shared<Ledger>(prevHash, transHash, accountHash, totCoins,
|
||||||
closingTime, prevClosingTime, closeFlags, closeResolution, ledgerSeq);
|
closingTime, prevClosingTime, closeFlags, closeResolution, ledgerSeq);
|
||||||
|
ret->setClosed();
|
||||||
if (ret->getHash() != ledgerHash)
|
if (ret->getHash() != ledgerHash)
|
||||||
{
|
{
|
||||||
if (sLog(lsERROR))
|
if (sLog(lsERROR))
|
||||||
|
|||||||
Reference in New Issue
Block a user