From b7cae9941c2f6193a695d21b49fb5b2198b4c91c Mon Sep 17 00:00:00 2001 From: Say Cheong Date: Wed, 18 Oct 2023 10:21:42 +0900 Subject: [PATCH 1/4] Fix updated addresses for every render --- NineChronicles.Headless/ActionEvaluationPublisher.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NineChronicles.Headless/ActionEvaluationPublisher.cs b/NineChronicles.Headless/ActionEvaluationPublisher.cs index 96f293c2b..623da1aa9 100644 --- a/NineChronicles.Headless/ActionEvaluationPublisher.cs +++ b/NineChronicles.Headless/ActionEvaluationPublisher.cs @@ -465,10 +465,15 @@ await _hub.BroadcastRenderBlockAsync( IAccountState output = _blockChainStates.GetAccountState(ev.OutputState); IAccountState input = _blockChainStates.GetAccountState(ev.PreviousState); AccountDiff diff = AccountDiff.Create(input, output); - if (!TargetAddresses.Any(diff.StateDiffs.Keys.Append(ev.Signer).Contains)) + var updatedAddresses = diff.StateDiffs.Keys + .Union(diff.FungibleAssetValueDiffs.Select(kv => kv.Key.Item1)) + .Append(ev.Signer) + .ToHashSet(); + if (!TargetAddresses.Any(updatedAddresses.Contains)) { return; } + var encodeElapsedMilliseconds = stopwatch.ElapsedMilliseconds; var eval = new NCActionEvaluation(pa, ev.Signer, ev.BlockIndex, ev.OutputState, ev.Exception, ev.PreviousState, ev.RandomSeed, extra); From 98341fc9dac6362fe03d9c60200864e12c373944 Mon Sep 17 00:00:00 2001 From: Say Cheong Date: Wed, 18 Oct 2023 10:21:42 +0900 Subject: [PATCH 2/4] Fix updated addresses for every render --- NineChronicles.Headless/ActionEvaluationPublisher.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NineChronicles.Headless/ActionEvaluationPublisher.cs b/NineChronicles.Headless/ActionEvaluationPublisher.cs index 96f293c2b..623da1aa9 100644 --- a/NineChronicles.Headless/ActionEvaluationPublisher.cs +++ b/NineChronicles.Headless/ActionEvaluationPublisher.cs @@ -465,10 +465,15 @@ await _hub.BroadcastRenderBlockAsync( IAccountState output = _blockChainStates.GetAccountState(ev.OutputState); IAccountState input = _blockChainStates.GetAccountState(ev.PreviousState); AccountDiff diff = AccountDiff.Create(input, output); - if (!TargetAddresses.Any(diff.StateDiffs.Keys.Append(ev.Signer).Contains)) + var updatedAddresses = diff.StateDiffs.Keys + .Union(diff.FungibleAssetValueDiffs.Select(kv => kv.Key.Item1)) + .Append(ev.Signer) + .ToHashSet(); + if (!TargetAddresses.Any(updatedAddresses.Contains)) { return; } + var encodeElapsedMilliseconds = stopwatch.ElapsedMilliseconds; var eval = new NCActionEvaluation(pa, ev.Signer, ev.BlockIndex, ev.OutputState, ev.Exception, ev.PreviousState, ev.RandomSeed, extra); From 1d6e0f8d0ede024b038a304f9daf5af5ac210f78 Mon Sep 17 00:00:00 2001 From: Say Cheong Date: Tue, 7 Nov 2023 12:09:38 +0900 Subject: [PATCH 3/4] Bump lib9c --- Lib9c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib9c b/Lib9c index b77fc8174..f8d681a6a 160000 --- a/Lib9c +++ b/Lib9c @@ -1 +1 @@ -Subproject commit b77fc8174af2f54bb276191d5a016009e600e7c7 +Subproject commit f8d681a6a622431eacb989477071613ce2b5fc5c From b0e1912abdf3d9208ffe86e30980e2a9d48982ce Mon Sep 17 00:00:00 2001 From: sonohoshi Date: Fri, 3 Nov 2023 13:44:02 +0900 Subject: [PATCH 4/4] fix: warning disable CS0618 about CombinationSlotState.UnlockStage --- .../GraphTypes/States/CombinationSlotStateType.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NineChronicles.Headless/GraphTypes/States/CombinationSlotStateType.cs b/NineChronicles.Headless/GraphTypes/States/CombinationSlotStateType.cs index b6742f078..dbc19948c 100644 --- a/NineChronicles.Headless/GraphTypes/States/CombinationSlotStateType.cs +++ b/NineChronicles.Headless/GraphTypes/States/CombinationSlotStateType.cs @@ -16,10 +16,13 @@ public CombinationSlotStateType() nameof(CombinationSlotState.UnlockBlockIndex), description: "Block index at the combination slot can be usable.", resolve: context => context.Source.UnlockBlockIndex); +#pragma warning disable CS0618 Field>( - nameof(CombinationSlotState.UnlockStage), + nameof( + CombinationSlotState.UnlockStage), description: "Stage id at the combination slot unlock.", resolve: context => context.Source.UnlockStage); +#pragma warning restore CS0618 Field>( nameof(CombinationSlotState.StartBlockIndex), description: "Block index at the combination started.",