mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Refactor ledger open check in OfferCreate.cpp
This commit is contained in:
@@ -562,7 +562,6 @@ OfferCreate::applyGuts(Sandbox& sb, Sandbox& sbCancel)
|
||||
return {tecEXPIRED, true};
|
||||
}
|
||||
|
||||
bool const bOpenLedger = sb.open();
|
||||
bool crossed = false;
|
||||
|
||||
if (isTesSuccess(result))
|
||||
@@ -648,7 +647,8 @@ OfferCreate::applyGuts(Sandbox& sb, Sandbox& sbCancel)
|
||||
stream << " out: " << format_amount(place_offer.out);
|
||||
}
|
||||
|
||||
if (result == tecFAILED_PROCESSING && bOpenLedger)
|
||||
bool const isLedgerOpen = sb.open();
|
||||
if (result == tecFAILED_PROCESSING && isLedgerOpen)
|
||||
result = telFAILED_PROCESSING;
|
||||
|
||||
if (!isTesSuccess(result))
|
||||
|
||||
Reference in New Issue
Block a user