Skip to content

Return cached result for already computed promises #5402

Description

@kuzminxyz

Problem
In ethexe/rpc/src/apis/injected/promise_manager.rs, try_register_subscriber does not check whether a promise is already resolved. A late subscriber will wait indefinitely and never receive a result.

Proposed solution
Before registering a subscriber, check if the promise is already computed. If so, immediately return the cached result.

Alternatives
N/A

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: normalStandard planned workscope: vara.ethVara Ethereum application layer (L2)size: SSmall task (hours)type: featNew functionality or user-visible improvement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions