iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
964 stars 577 forks source link

Fix transactions cmd not handling streaming errors #5053

Closed NullSoldier closed 3 weeks ago

NullSoldier commented 3 weeks ago

Summary

The error here is that the error in getAccountTransactionsStream becomes unhandled, because we pause the event loop to wait on getNetworkInfo. The error handler for getAccountTransactionsStream isnt registered until we await it's content stream later on. Unfortunately because getNetworkInfo prevents that form happening it'll be treated as an unhandled exception which crashes in oclif itself.

Testing Plan

Revert the code and use ironfish wallet:transactions gidhjfgdfsgfdsfgds. The account should not exist and it will reproduce the error.

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API Reference)? If yes, link a related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and label it with breaking-change-rpc or breaking-change-sdk.

[ ] Yes