Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial service building blocks #1

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Jul 19, 2024

We add the additional daemon/service building blocks.

@tnull tnull force-pushed the elias/2024-07-basic-hyper-setup branch from 6197a44 to e48c89f Compare July 19, 2024 08:19
server/src/main.rs Outdated Show resolved Hide resolved
println!(
"CHANNEL_PENDING: {} from counterparty {}",
channel_id, counterparty_node_id
);
Copy link

Choose a reason for hiding this comment

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

Indentation off here and below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

I think we'll have to drop all the printlns soon anyways in favor of some better logging. Possibly a split logger that logs to stdout and to file?

server/src/main.rs Outdated Show resolved Hide resolved
Ok(request) => match handler(node, request) {
Ok(response) => Ok(Response::builder()
.body(Full::new(Bytes::from(response.encode_to_vec())))
// unwrap safety: body only errors when previous chained calls failed.
Copy link

Choose a reason for hiding this comment

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

Do we plan on doing this on every unwrap? Should we do so throughout this PR if so?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes I think so. Now got rid of the unwraps when building node/runtime and added another comment.

server/src/service.rs Show resolved Hide resolved
server/src/service.rs Outdated Show resolved Hide resolved
Copy link

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

LGTM. Please squash.

@tnull tnull force-pushed the elias/2024-07-basic-hyper-setup branch from 7e84e34 to 7fc39ea Compare July 23, 2024 08:36
@tnull
Copy link
Collaborator Author

tnull commented Jul 23, 2024

LGTM. Please squash.

Squashed without further changes.

@tnull tnull merged commit 616e772 into main Jul 23, 2024
0 of 2 checks passed
@tnull tnull deleted the elias/2024-07-basic-hyper-setup branch August 22, 2024 05:56
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