Admit v10 mutation choices through the cellular host and sessions
The region host checks a choice against the committed offer, reserves the successor for the next tick, and publishes it with that tick's batch; the owner's v10 session gets the receipt and final outcome. Schema v35 now refuses a checkpoint that skips a reserved choice, and the host reloads pending reservations after uncertainty, refusal or recovery (ADR-0121). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,18 @@ class CellularBridge {
|
||||
std::uint64_t generation, std::uint64_t request) {
|
||||
return host.query_primitive_life(account.bytes, generation, request);
|
||||
};
|
||||
config.select_cellular_mutation = [&host](const network::AccountId& account,
|
||||
std::uint64_t generation,
|
||||
const network::CellularMutationAction& m) {
|
||||
const auto reply =
|
||||
host.select_mutation(account.bytes, generation, m.action_id,
|
||||
{m.life_identity, m.event_index, m.offer_tick, m.operator_id});
|
||||
server::CellularMutationAnswer answer{
|
||||
server::admit_status(reply.status), reply.tick, {}};
|
||||
if (reply.outcome)
|
||||
answer.outcome = server::action_outcome(*reply.outcome);
|
||||
return answer;
|
||||
};
|
||||
auto sessions = server::RegionSessions::create(std::move(config));
|
||||
if (!sessions)
|
||||
return fail(sessions.error() == server::RegionSessionsError::transport
|
||||
|
||||
Reference in New Issue
Block a user