Skip to content

return an error if transaction history futures initialization fails #1986

@shamardy

Description

@shamardy

As explained by @onur-ozkan

Just checked the source code, activation and deactivation operations are relying on the CoinsContext Mutex.

e.g.,:

activation requested -> TendermintCoin initialized -> spawning tx/history / balance streaming futures -> locked(no parallel execution allowed here) coins context and added TendermintCoin in there -> success result

However, spawned futures can end up unexpectedly because there is no guarantee that they will be successfully executed/initialized before we add their coin into CoinsContext. This means that a spawned future could encounter errors or panics after we add the coin to the context and return a success result.

ref. #1978 (comment), #1978 (comment), #1978 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions