mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-22 23:00:55 +00:00
finish fn result refactor (#7947)
This commit is contained in:
@@ -58,14 +58,19 @@ ApplyContext::discard()
|
||||
std::optional<TxMeta>
|
||||
ApplyContext::apply(TER ter)
|
||||
{
|
||||
if (vmReturnCode_.has_value())
|
||||
// tecINTERNAL reports an xrpld bug, not a result: nothing the VM recorded
|
||||
// before we hit it belongs in the metadata.
|
||||
if (ter != tecINTERNAL)
|
||||
{
|
||||
if (vmReturnCode_.has_value())
|
||||
{
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
|
||||
view_->setVMReturnCode(*vmReturnCode_);
|
||||
}
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
|
||||
view_->setVMReturnCode(*vmReturnCode_);
|
||||
view_->setGasUsed(gasUsed_);
|
||||
}
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
|
||||
view_->setGasUsed(gasUsed_);
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access) view_ emplaced in constructor
|
||||
return view_->apply(base_, tx, ter, parentBatchId_, (flags_ & TapDryRun) != 0u, journal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user