Format M11 cellular code with clang-format 19
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m52s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m2s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m47s
Foundation / checks (postgres) (push) Canceled after 1m24s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m52s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m2s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m47s
Foundation / checks (postgres) (push) Canceled after 1m24s
This commit is contained in:
@@ -144,11 +144,9 @@ IntentAdmission::scheduled_cellular_intentions(std::uint64_t tick) const {
|
||||
return out;
|
||||
}
|
||||
|
||||
ActionReceipt IntentAdmission::screen(Session& s, const SessionAction& m,
|
||||
const AdmissionFacts& facts, bool& check,
|
||||
std::optional<std::array<std::uint8_t,
|
||||
cellular_action_input_bytes>>
|
||||
cellular_input) {
|
||||
ActionReceipt IntentAdmission::screen(
|
||||
Session& s, const SessionAction& m, const AdmissionFacts& facts, bool& check,
|
||||
std::optional<std::array<std::uint8_t, cellular_action_input_bytes>> cellular_input) {
|
||||
ActionReceipt r{m.action_id, AdmitStatus::admitted, facts.server_tick, m.tick};
|
||||
check = false;
|
||||
count_window(s, facts.server_tick);
|
||||
@@ -174,15 +172,14 @@ ActionReceipt IntentAdmission::screen(Session& s, const SessionAction& m,
|
||||
m.kind != static_cast<std::uint16_t>(ActionKind::cellular)) ||
|
||||
(m.kind == static_cast<std::uint16_t>(ActionKind::cellular)) !=
|
||||
cellular_input.has_value() ||
|
||||
m.action_id == 0 ||
|
||||
(cellular_input && !decode_cellular_action_input(*cellular_input)))
|
||||
m.action_id == 0 || (cellular_input && !decode_cellular_action_input(*cellular_input)))
|
||||
r.status = AdmitStatus::invalid_action;
|
||||
else if (known_action != actions_.end() || known_final != finals_.end()) {
|
||||
const auto same = [&](ActionKind kind,
|
||||
const std::optional<std::array<std::uint8_t,
|
||||
cellular_action_input_bytes>>& bytes) {
|
||||
return static_cast<std::uint16_t>(kind) == m.kind && bytes == cellular_input;
|
||||
};
|
||||
const auto same =
|
||||
[&](ActionKind kind,
|
||||
const std::optional<std::array<std::uint8_t, cellular_action_input_bytes>>& bytes) {
|
||||
return static_cast<std::uint16_t>(kind) == m.kind && bytes == cellular_input;
|
||||
};
|
||||
if (known_action != actions_.end()) {
|
||||
r.tick = known_action->carried.tick;
|
||||
r.status = same(known_action->carried.kind, known_action->carried.cellular_input)
|
||||
@@ -216,8 +213,8 @@ void IntentAdmission::decide(
|
||||
}
|
||||
r.status = AdmitStatus::duplicate;
|
||||
r.tick = found.outcome.tick;
|
||||
remember(account, found.outcome,
|
||||
cellular_input ? ActionKind::cellular : ActionKind::probe, cellular_input);
|
||||
remember(account, found.outcome, cellular_input ? ActionKind::cellular : ActionKind::probe,
|
||||
cellular_input);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,8 +247,8 @@ ActionReceipt IntentAdmission::action(std::uint64_t session, const CellularActio
|
||||
if (check)
|
||||
decide(s->account, r, lookup(s->account, m.action_id), bytes);
|
||||
if (r.status == AdmitStatus::admitted)
|
||||
actions_.push_back({{s->account, m.action_id, m.tick, ActionKind::cellular, bytes},
|
||||
Stage::scheduled});
|
||||
actions_.push_back(
|
||||
{{s->account, m.action_id, m.tick, ActionKind::cellular, bytes}, Stage::scheduled});
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -277,9 +274,8 @@ std::optional<ActionReceipt> IntentAdmission::admit(std::uint64_t session, const
|
||||
return r;
|
||||
}
|
||||
|
||||
std::optional<ActionReceipt> IntentAdmission::admit(std::uint64_t session,
|
||||
const CellularAction& m,
|
||||
const AdmissionFacts& facts) {
|
||||
std::optional<ActionReceipt> IntentAdmission::admit(std::uint64_t session, const CellularAction& m,
|
||||
const AdmissionFacts& facts) {
|
||||
const SessionAction base{m.session, m.epoch, m.action_id,
|
||||
static_cast<std::uint16_t>(ActionKind::cellular), m.tick};
|
||||
const auto bytes = encode_cellular_action_input(
|
||||
@@ -452,8 +448,9 @@ std::vector<AccountOutcome> IntentAdmission::committed(std::span<const CarriedAc
|
||||
}
|
||||
for (std::size_t i = 0; i < actions.size(); ++i) {
|
||||
const auto& c = actions[i];
|
||||
const auto local_result = c.kind == ActionKind::cellular ? ActionResult::committed
|
||||
: ActionResult::committed_no_effect;
|
||||
const auto local_result = c.kind == ActionKind::cellular
|
||||
? ActionResult::committed
|
||||
: ActionResult::committed_no_effect;
|
||||
ActionOutcome o{c.action_id, local_result, c.tick, commit_sequence};
|
||||
if (records.has_value())
|
||||
if (const auto& record = (*records)[i]; record.has_value())
|
||||
|
||||
Reference in New Issue
Block a user