Check durable action optional before unwrapping
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m0s
Foundation / checks (network) (push) Failing after 6m44s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 33s
Foundation / checks (checks) (push) Canceled after 9m28s
Foundation / checks (client) (push) Canceled after 9m29s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m0s
Foundation / checks (network) (push) Failing after 6m44s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 33s
Foundation / checks (checks) (push) Canceled after 9m28s
Foundation / checks (client) (push) Canceled after 9m29s
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "evo/network/intent_admission.hpp"
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
namespace evo::network {
|
||||
namespace {
|
||||
@@ -521,9 +522,10 @@ ActionLedger::find_record(const AccountId& account, std::uint64_t action_id) {
|
||||
auto found = find(account, action_id);
|
||||
if (!found.has_value())
|
||||
return std::unexpected(found.error());
|
||||
if (!found.value())
|
||||
auto action = std::move(found).value();
|
||||
if (!action.has_value())
|
||||
return std::optional<DurableActionRecord>{};
|
||||
return std::optional<DurableActionRecord>{DurableActionRecord{*found.value(), std::nullopt}};
|
||||
return std::optional<DurableActionRecord>{DurableActionRecord{action.value(), std::nullopt}};
|
||||
}
|
||||
|
||||
std::expected<std::vector<std::optional<DurableActionRecord>>, ActionLedgerError>
|
||||
|
||||
Reference in New Issue
Block a user