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:
@@ -6708,3 +6708,9 @@ axis clamp, where mixed signed and unsigned conditional expressions selected
|
|||||||
their common unsigned type. The clamp now applies signed deltas in explicit
|
their common unsigned type. The clamp now applies signed deltas in explicit
|
||||||
branches and converts only their nonnegative magnitudes. Full run243 checks are
|
branches and converts only their nonnegative magnitudes. Full run243 checks are
|
||||||
still in progress; the client job failed at this diagnostic before tests ran.
|
still in progress; the client job failed at this diagnostic before tests ran.
|
||||||
|
|
||||||
|
During run 244, clang-tidy 19 found an unchecked access to the nested optional
|
||||||
|
in `ActionLedger::find_record`. The function now moves the inner optional to a
|
||||||
|
local, checks its state, and unwraps only after that check. This is an existing
|
||||||
|
network-ledger warning exposed by the full network target; full CI is pending
|
||||||
|
for the combined repairs.
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "evo/network/intent_admission.hpp"
|
#include "evo/network/intent_admission.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
namespace evo::network {
|
namespace evo::network {
|
||||||
namespace {
|
namespace {
|
||||||
@@ -521,9 +522,10 @@ ActionLedger::find_record(const AccountId& account, std::uint64_t action_id) {
|
|||||||
auto found = find(account, action_id);
|
auto found = find(account, action_id);
|
||||||
if (!found.has_value())
|
if (!found.has_value())
|
||||||
return std::unexpected(found.error());
|
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>{};
|
||||||
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>
|
std::expected<std::vector<std::optional<DurableActionRecord>>, ActionLedgerError>
|
||||||
|
|||||||
Reference in New Issue
Block a user