Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

chore: RPC-related Cleanup #113

Merged
merged 3 commits into from
Jun 15, 2022
Merged

chore: RPC-related Cleanup #113

merged 3 commits into from
Jun 15, 2022

Conversation

harrysolovay
Copy link
Contributor

No description provided.

@@ -2,14 +2,17 @@ import * as rpc from "../../../rpc/mod.ts";
import { effector, EffectorArgs } from "../../impl/mod.ts";

export interface RpcClientR<Beacon> {
rpc: rpc.RpcClientFactory<Beacon>;
rpc: rpc.RpcClientFactory<Beacon, rpc.RpcError>;
Copy link
Contributor Author

@harrysolovay harrysolovay Jun 15, 2022

Choose a reason for hiding this comment

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

Ignore the fact that we specify the wide rpc.RpcError instead of piping the error types through the top-level rpcClient effect. We'll get to this later (#46).

@harrysolovay harrysolovay requested a review from tjjfvi June 15, 2022 09:37
rpc/Base.ts Outdated

export abstract class RpcClient {
/** Send a message to the RPC server without
Copy link
Contributor

Choose a reason for hiding this comment

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

without what?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch

super();
}
}
export abstract class RpcClient<RpcError extends E.RpcError> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this generic on the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thinking is that we'll want beacon-specific error types (web sockets can error out differently from Smoldot client instances).

@harrysolovay harrysolovay requested a review from tjjfvi June 15, 2022 13:18
@harrysolovay harrysolovay merged commit 355f050 into main Jun 15, 2022
@harrysolovay harrysolovay deleted the smoldot-rpc-cleanup branch June 15, 2022 13:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants