Chain drama: fee tiers, congestion, mempool drops, address poisoning, clipboard hijack, phishing; selected-button style

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZHU MINCHAOandClaude Opus 5.5 committed 2026-11-03 23:29:54 +08:00
1 parent 2b781acd82
commit dbba8b4376
15 files changed
+357 -20

No files matched your search

+13
View File
@@ -69,6 +69,19 @@ namespace Decentralized
Log.Info($"买入测试:卡 #{item.uniqueId} 买前报价 {before},买下后价值 {item.unitValue},真实 {CardValue.True(Items.ToUnit(item))},说法 {(Items.GetClaim(item)?.Encode() ?? "无")}");
}));
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Hardware wallets (test)", () => { Items.Give(Items.NewHwWallet(false)); Items.Give(Items.NewHwWallet(true)); Log.Info("测试:给了一个正品、一个被投毒的硬件钱包"); });
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Chain drama (test)", () => Log.Guard("链上事件测试", () =>
{
// 今天拥堵;当前钱包最近转出过的地址立刻收到相似地址的 0 币转入;报纸和论坛各来一条钓鱼
var d = Session.Data;
int day = StoreStation.GetDayCounter();
d.CongestedFrom = day; d.CongestedUntil = day + 1;
var last = d.Hot.History.FirstOrDefault(r => !r.In);
if (last != null) TxRules.Record(d.Hot.History, new TxRecord { Addr = ChainAddress.Lookalike(last.Addr, d.Rng), Asset = Assets.PSC, Amount = 0, Day = day, In = true });
string fake = ChainAddress.Make(d.Rng.NextUInt());
News.Show("pd_news_phish_test_" + day, L.T("news.phish.title"), L.T("news.phish.desc", fake), 2);
d.Black.Forum.Add("phish:" + ChainAddress.Make(d.Rng.NextUInt()));
Log.Info($"测试:拥堵到第 {d.CongestedUntil} 天;投毒 {(last != null ? last.Addr : "无转出记录")};钓鱼 {fake}");
}));
ModHelper.AddDebugFunction(ModInfo.Id, ModInfo.Name, "Dr. Jackson stock (test)", () =>
{
EmporiumEntry.Instance.ClearFrontInv();