mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix issues
This commit is contained in:
@@ -14,7 +14,7 @@ namespace xrpl {
|
||||
bool
|
||||
AccountRoot::isGlobalFrozen() const
|
||||
{
|
||||
if (isXRP(id_))
|
||||
if (!exists())
|
||||
return false;
|
||||
return sle_->isFlag(lsfGlobalFreeze);
|
||||
}
|
||||
@@ -64,6 +64,9 @@ confineOwnerCount(
|
||||
XRPAmount
|
||||
AccountRoot::xrpLiquid(std::int32_t ownerCountAdj, beast::Journal j) const
|
||||
{
|
||||
if (!exists())
|
||||
return beast::zero;
|
||||
|
||||
// Return balance minus reserve
|
||||
std::uint32_t const ownerCount = confineOwnerCount(
|
||||
readView_.ownerCountHook(id_, sle_->getFieldU32(sfOwnerCount)), ownerCountAdj);
|
||||
|
||||
@@ -563,7 +563,7 @@ canTransfer(ReadView const& view, Issue const& issue, AccountID const& from, Acc
|
||||
if (issuerId == from || issuerId == to)
|
||||
return tesSUCCESS;
|
||||
auto const issuer = AccountRoot(issuerId, view);
|
||||
if (issuer.exists())
|
||||
if (!issuer.exists())
|
||||
return tefINTERNAL; // LCOV_EXCL_LINE
|
||||
|
||||
auto const isRippleDisabled = [&](AccountID account) -> bool {
|
||||
|
||||
@@ -461,7 +461,7 @@ transactionPreProcessImpl(
|
||||
if (verify)
|
||||
acctSrc.emplace(srcAddressID, *app.openLedger().current());
|
||||
|
||||
if (verify && !acctSrc.value() && acctSrc->exists())
|
||||
if (verify && acctSrc.has_value() && !acctSrc->exists())
|
||||
{
|
||||
// If not offline and did not find account, error.
|
||||
JLOG(j.debug()) << "transactionSign: Failed to find source account "
|
||||
|
||||
Reference in New Issue
Block a user