Skip to content

Add sysio::chain::application for common code of wire applications - #178

Merged
heifner merged 6 commits into
masterfrom
feature/wire-application
Jan 26, 2026
Merged

Add sysio::chain::application for common code of wire applications#178
heifner merged 6 commits into
masterfrom
feature/wire-application

Conversation

@heifner

@heifner heifner commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

sysio::chain::application greatly simplifies creation of nodeop like applications.

@heifner
heifner requested a review from jglanz January 20, 2026 14:41
@heifner heifner changed the title Add wire_application for common code of wire applications Add sysio::chain::application for common code of wire applications Jan 26, 2026
*/
namespace sysio::chain {

struct wire_application_config {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to application_config

uint16_t default_http_port = 8888;
};

enum return_codes {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exit_code?

Also if standard enum, then prefix with RETURN|EXIT_CODE_SUCCESS, etc. If enum class then ignore

std::scoped_lock lock(mutex);

for (auto& filename : file_names) {
FC_ASSERT_FMT(exists(filename), "File does not exist: {}", filename.string());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jglanz double check in the future but fine for now


try {
appbase::scoped_app app;
chain::application exe{wire_application_config{}};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

application_config

Renamed return_codes to exit_code and wrapped in a namespace.
@heifner
heifner merged commit e4ad79a into master Jan 26, 2026
51 of 53 checks passed
@heifner
heifner deleted the feature/wire-application branch January 26, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants