Local accounts now have their balances and sequences managed from the active

ledger, not from the wallet.
This commit is contained in:
JoelKatz
2012-04-24 04:24:14 -07:00
parent f36d1fdc08
commit 0392d8ddcb
6 changed files with 42 additions and 70 deletions

View File

@@ -182,18 +182,6 @@ Ledger::pointer Ledger::closeLedger(uint64 timeStamp)
return Ledger::pointer(new Ledger(*this, timeStamp)); // can't use make_shared, constructor is protected
}
void LocalAccount::syncLedger()
{
AccountState::pointer as = theApp->getMasterLedger().getCurrentLedger()->getAccountState(getAddress());
if(!as) mLgrBalance = 0;
else
{
mLgrBalance = as->getBalance();
if ( (mLgrBalance != 0) && (mTxnSeq == 0) ) mTxnSeq = 1;
if (mTxnSeq < as->getSeq()) mTxnSeq = as->getSeq();
}
}
bool Ledger::unitTest()
{
#if 0