-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat(rpc): implement MpoolSelect
#4197
Conversation
The newly exposed code could use a lot of love. |
@@ -1,6 +1,6 @@ | |||
// Copyright 2019-2024 ChainSafe Systems | |||
// SPDX-License-Identifier: Apache-2.0, MIT | |||
|
|||
#![allow(clippy::indexing_slicing)] |
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'd rather see documented unwraps
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.
Me too. I opened a new tracking issue: #4229
@@ -6,6 +6,7 @@ | |||
//! `select_messages` API which selects an appropriate set of messages such that | |||
//! it optimizes miner reward and chain capacity. See <https://docs.filecoin.io/mine/lotus/message-pool/#message-selection> for more details | |||
|
|||
#![allow(clippy::indexing_slicing)] |
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.
As above
pub enum MpoolSelect {} | ||
impl RpcMethod<2> for MpoolSelect { | ||
const NAME: &'static str = "Filecoin.MpoolSelect"; | ||
const PARAM_NAMES: [&'static str; 2] = ["tsk", "tq"]; |
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.
Should we use full words, tipset_key
and, what is tq
?
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.
Other commands also use 'tsk'. Not sure what tq
means. I blatantly copied it from Lotus. Hopefully, we can fix it once we understand what these RPC methods should do.
Summary of changes
Changes introduced in this pull request:
select_messages
, which was hidden behind#[cfg(test)]
.MpoolSelect
against Lotus.Reference issue to close (if applicable)
Closes #4196
Other information and links
Change checklist