Quellcode durchsuchen

Follow master's #75 and #87 shapes in the merged web and push paths

Master's #87 dropped the 901 codec's clock policy helpers, so the artifact purchase lines report the request fields only. Its change-ring globals in the family-4 inventory updates now own kChangeKind and kChangeFlags, so the two local copies go. Master's #75 profile-setup commit logs through core::log, which the account runtime now includes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017y4GeUXaw46fq2mDFGBVHN
stan vor 4 Tagen
Ursprung
Commit
fd1c441026

+ 0 - 4
Sunrise/src/server/bap/encrypted/push/snapshot/family4_inventory_updates.cpp

@@ -259,8 +259,6 @@ bool prepare_seasonal_experience_presentation(
     constexpr std::uint16_t kChangeSequence = 0;
     constexpr std::uint16_t kChangeSequence = 0;
     constexpr std::uint16_t kChangeNextWriteSlot = 1;
     constexpr std::uint16_t kChangeNextWriteSlot = 1;
     constexpr std::uint16_t kChangeNextSequence = 1;
     constexpr std::uint16_t kChangeNextSequence = 1;
-    constexpr std::uint8_t kChangeKind = 1;
-    constexpr std::uint16_t kChangeFlags = 0;
 
 
     if (amount <= 0 || mutationSerial < 0 || !queuez::valid(before) || !before.family4Active
     if (amount <= 0 || mutationSerial < 0 || !queuez::valid(before) || !before.family4Active
         || before.family4RootSoid == 0 || before.family4ResidentCount == 0
         || before.family4RootSoid == 0 || before.family4ResidentCount == 0
@@ -600,8 +598,6 @@ bool prepare_record_reward_grant(
     Prepared& prepared) noexcept {
     Prepared& prepared) noexcept {
     namespace account_layout = family4_datagen::account::layout;
     namespace account_layout = family4_datagen::account::layout;
     namespace character_layout = family4_datagen::character::layout;
     namespace character_layout = family4_datagen::character::layout;
-    constexpr std::uint8_t kChangeKind = 1;
-    constexpr std::uint16_t kChangeFlags = 0;
     if (!mutation.prepared || mutation.rewardCount == 0
     if (!mutation.prepared || mutation.rewardCount == 0
         || mutation.rewardCount > mutation.rewards.size() || !queuez::valid(before)
         || mutation.rewardCount > mutation.rewards.size() || !queuez::valid(before)
         || !queuez::valid(update.after) || !before.family4Active || before.family4ResidentCount == 0
         || !queuez::valid(update.after) || !before.family4Active || before.family4ResidentCount == 0

+ 8 - 14
Sunrise/src/server/web_service/web_service_runtime.cpp

@@ -133,18 +133,14 @@ void note_character_writeback(const middleware::web_service::Message& message) n
     namespace purchase_codec = middleware::web_service::messages::opcode901;
     namespace purchase_codec = middleware::web_service::messages::opcode901;
     purchase_codec::Request purchase;
     purchase_codec::Request purchase;
     const bool parsed = purchase_codec::parse_request(message, purchase);
     const bool parsed = purchase_codec::parse_request(message, purchase);
-    // The clock verdict is logged, never acted on. Nothing can pass while the route refuses.
-    const auto policy = purchase_codec::check_clock(purchase, server_clock_seconds());
     std::array<char, kPurchaseLineCapacity> line{};
     std::array<char, kPurchaseLineCapacity> line{};
     const int length =
     const int length =
-        parsed ? std::snprintf(
-                     line.data(),
-                     line.size(),
-                     "ev=ws901 stage=purchase result=refuse vendor=%d sale=%d present=%u policy=%s",
-                     static_cast<int>(purchase.vendorIndex),
-                     static_cast<int>(purchase.saleIndex),
-                     purchase.hasClock ? 1U : 0U,
-                     purchase_codec::clock_policy_name(policy))
+        parsed ? std::snprintf(line.data(),
+                               line.size(),
+                               "ev=ws901 stage=purchase result=refuse vendor=%d sale=%d present=%u",
+                               static_cast<int>(purchase.vendorIndex),
+                               static_cast<int>(purchase.saleIndex),
+                               purchase.hasClock ? 1U : 0U)
                : std::snprintf(line.data(),
                : std::snprintf(line.data(),
                                line.size(),
                                line.size(),
                                "ev=ws901 stage=purchase result=refuse reason=parse");
                                "ev=ws901 stage=purchase result=refuse reason=parse");
@@ -208,11 +204,9 @@ void note_character_writeback(const middleware::web_service::Message& message) n
     const int length =
     const int length =
         std::snprintf(line.data(),
         std::snprintf(line.data(),
                       line.size(),
                       line.size(),
-                      "ev=ws901 stage=artifact result=ok vendor=%d sale=%d policy=%s",
+                      "ev=ws901 stage=artifact result=ok vendor=%d sale=%d",
                       static_cast<int>(purchase.vendorIndex),
                       static_cast<int>(purchase.vendorIndex),
-                      static_cast<int>(purchase.saleIndex),
-                      purchase_codec::clock_policy_name(
-                          purchase_codec::check_clock(purchase, server_clock_seconds())));
+                      static_cast<int>(purchase.saleIndex));
     if (length > 0) {
     if (length > 0) {
         core::log::write(core::log::Channel::server,
         core::log::write(core::log::Channel::server,
                          core::log::Level::info,
                          core::log::Level::info,

+ 1 - 0
Sunrise/src/state/runtime/state_account_runtime.cpp

@@ -6,6 +6,7 @@
 #include <cstdint>
 #include <cstdint>
 #include <utility>
 #include <utility>
 
 
+#include "../../core/logging/log.h"
 #include "../../middleware/datagen/family4/loadout/loadout_resolver.h"
 #include "../../middleware/datagen/family4/loadout/loadout_resolver.h"
 #include "../build_data/runtime.h"
 #include "../build_data/runtime.h"
 #include "runtime.h"
 #include "runtime.h"