Skip to content

Commit

Permalink
fix: Fixed the node append event to raise after the block render.
Browse files Browse the repository at this point in the history
  • Loading branch information
s2quake committed Jul 16, 2024
1 parent 809edb0 commit 68b5ec1
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/node/LibplanetConsole.Nodes/Node.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,21 @@ async Task IApplicationService.InitializeAsync(
}

void IRenderer.RenderBlock(Block oldTip, Block newTip)
{
}

void IActionRenderer.RenderAction(
IValue action, ICommittedActionContext context, HashDigest<SHA256> nextState)
{
}

void IActionRenderer.RenderActionError(
IValue action, ICommittedActionContext context, Exception exception)
{
_exceptionByAction.AddOrUpdate(action, exception, (_, _) => exception);
}

void IActionRenderer.RenderBlockEnd(Block oldTip, Block newTip)
{
_synchronizationContext.Post(Action, state: null);

Expand All @@ -412,21 +427,6 @@ void Action(object? state)
}
}

void IActionRenderer.RenderAction(
IValue action, ICommittedActionContext context, HashDigest<SHA256> nextState)
{
}

void IActionRenderer.RenderActionError(
IValue action, ICommittedActionContext context, Exception exception)
{
_exceptionByAction.AddOrUpdate(action, exception, (_, _) => exception);
}

void IActionRenderer.RenderBlockEnd(Block oldTip, Block newTip)
{
}

private static IActionLoader[] CollectActionLoaders(IServiceProvider serviceProvider)
{
var actionLoaderProviders
Expand Down

0 comments on commit 68b5ec1

Please sign in to comment.