Skip to content

Commit 152bcc6

Browse files
committed
address comments
1 parent c91a62f commit 152bcc6

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/rpc/methods/chain.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,25 +127,21 @@ pub(crate) fn logs<DB: Blockstore + Sync + Send + 'static>(
127127
(receiver, handle)
128128
}
129129

130-
/// Returns the latest finalized tipset.
131-
/// It uses the current F3 instance to determine the finalized tipset.
132-
/// If F3 is operational and finalizing in this node. If not, it will fall back
133-
/// to the Expected Consensus (EC) finality definition of head - 900 epochs.
134130
pub enum ChainGetFinalizedTipset {}
135131
impl RpcMethod<0> for ChainGetFinalizedTipset {
136132
const NAME: &'static str = "Filecoin.ChainGetFinalizedTipSet";
137133
const PARAM_NAMES: [&'static str; 0] = [];
138134
const API_PATHS: BitFlags<ApiPaths> = make_bitflags!(ApiPaths::V1);
139135
const PERMISSION: Permission = Permission::Read;
140136
const DESCRIPTION: Option<&'static str> = Some(
141-
"Returns the latest finalized tipset. It uses the f3 instance or Expected Consensus (EC) definition (head - 900 epochs) to get the finalized tipset.",
137+
"Returns the latest F3 finalized tipset, or falls back to EC finality if F3 is not operational on the node or if the F3 finalized tipset is further back than EC finalized tipset.",
142138
);
143139

144140
type Params = ();
145141
type Ok = Tipset;
146142

147143
async fn handle(_ctx: Ctx<impl Blockstore>, (): Self::Params) -> Result<Self::Ok, ServerError> {
148-
Err(anyhow::anyhow!("ChainGetFinalizedTipset is not yet implemented").into())
144+
Err(ServerError::stubbed_for_openrpc())
149145
}
150146
}
151147

src/tool/subcommands/api_cmd/test_snapshots_ignored.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Filecoin.AuthNew
1313
Filecoin.AuthVerify
1414
Filecoin.ChainExport
1515
Filecoin.ChainGetEvents
16+
Filecoin.ChainGetFinalizedTipset
1617
Filecoin.ChainSetHead
1718
Filecoin.EthEstimateGas
1819
Filecoin.EthGetFilterChanges

0 commit comments

Comments
 (0)