// pHash is optional, the account will update its internal copy of the hash anyway. // bool OTAccount::SaveInbox (OTLedger &theBox, OTIdentifier * pHash/*=NULL*/) { if (!IsSameAccount(theBox)) { const OTString strAcctID(GetRealAccountID()), strServerID(GetRealServerID()), strBoxAcctID(theBox.GetRealAccountID()), strBoxSvrID(theBox.GetRealServerID()); OTLog::vError("OTAccount::SaveInbox: ERROR: The ledger passed in, isn't even for this account!\n" " Acct ID: %s\n Other ID: %s\n Server ID: %s\n Other ID: %s\n", strAcctID.Get(), strBoxAcctID.Get(), strServerID.Get(), strBoxSvrID.Get()); return false; } OTIdentifier theHash; // Use pHash. if (NULL == pHash) pHash = &theHash; // ------------------------------------------ bool bSuccess = theBox.SaveInbox(pHash); if (bSuccess) this->SetInboxHash(*pHash); return bSuccess; }