Merge remote-tracking branch 'upstream/main' into merge-gramsrv-2965f5d

This commit is contained in:
onysd 2026-07-20 23:43:51 +03:00
commit ebb0be38d9
355 changed files with 44640 additions and 2320 deletions

View file

@ -553,6 +553,19 @@ func TestLoadRejectsNonTelesrvConfigKeys(t *testing.T) {
}
}
func TestValidateStarGiftConfigRejectsNegativeInternalTONGrant(t *testing.T) {
cfg := Config{
StarGiftSweepInterval: time.Second,
StarGiftSweepBatch: 1,
StarGiftTONStartingGrant: -1,
StarGiftStarsProceedsPermille: 1000,
StarGiftTONProceedsPermille: 1000,
}
if err := validateStarGiftConfig(cfg); err == nil {
t.Fatal("negative internal TON starting grant was accepted")
}
}
func writeConfigFile(t *testing.T, path, body string) {
t.Helper()
if err := os.WriteFile(path, []byte(body), 0o600); err != nil {