-
Notifications
You must be signed in to change notification settings - Fork 20
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
cuprated: P2P protocol request handler #303
Conversation
let BlockChainContextResponse::Context(context) = blockchain_context_service | ||
.ready() | ||
.await | ||
.expect(PANIC_CRITICAL_SERVICE_ERROR) | ||
.call(BlockChainContextRequest::Context) | ||
.await | ||
.expect(PANIC_CRITICAL_SERVICE_ERROR) | ||
else { | ||
unreachable!() | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From #308 (review):
binaries/cuprated/src/rpc/request/*.rs which are fn versions of our tower::Service's Request -> Response to reduce noise
Since cuprated
will be using Service
s like this in general, should I move this folder? Maybe cuprated/src/service/*.rs
? I think this will reduce noise significantly through cuprated
, example here would be:
let context = blockchain_context::context(&mut blockchain_context_service)
.await
.expect(PANIC_CRITICAL_SERVICE_ERROR)
.unchecked_blockchain_context();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have plans to rework this service to make getting the context not require a Service
request, so for now I don't think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reasoning for 83a3626
boog900: hinto: can we disable the
rust-2024-compatibility
lint: https://github.com/Cuprate/cuprate/actions/runs/12142669672/job/33857710159
hinto: I forgot our docs were nightly, yes btw maybe in #303?
boog900: sure
What
Implements the P2P protocol handler