perf(channelserver): cache rengoku_data.bin at startup

Load and validate rengoku_data.bin once during server initialization
instead of reading it from disk on every client request. The file is
static ECD-encrypted config data (~4.9 KB) that never changes at
runtime. Validation checks file size and ECD magic bytes, logging a
warning if the file is missing or invalid so misconfiguration is
caught before any client connects.
This commit is contained in:
Houmgaor
2026-03-02 20:12:39 +01:00
parent aee53534a2
commit 5b631d1704
5 changed files with 139 additions and 8 deletions

View File

@@ -71,8 +71,7 @@ if err != nil {
**Pattern C — Fail ACK (correct):** Error logged, explicit fail ACK sent. The client shows an appropriate error dialog and stays connected.
```go
if err != nil {
s.logger.Error("Failed to read rengoku_data.bin", zap.Error(err))
if data == nil {
doAckBufFail(s, pkt.AckHandle, nil)
return
}