Skip to content

Commit

Permalink
test: lotus compatibilty test for ChainGetTipSet rpc method (#3673)
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmih authored Nov 6, 2023
1 parent 14a8096 commit e8fe286
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rpc_client/chain_ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ impl ApiInfo {
RpcRequest::new(CHAIN_GET_TIPSET_BY_HEIGHT, (epoch, head))
}

pub fn chain_get_tipset_req(tsk: TipsetKeys) -> RpcRequest<Tipset> {
RpcRequest::new(CHAIN_GET_TIPSET, (tsk,))
}

pub async fn chain_get_genesis(&self) -> Result<Option<Tipset>, JsonRpcError> {
self.call(Self::chain_get_genesis_req()).await
}
Expand Down
1 change: 1 addition & 0 deletions src/tool/subcommands/api_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ fn chain_tests_with_tipset(shared_tipset: &Tipset) -> Vec<RpcTest> {
shared_tipset.epoch(),
TipsetKeys::default(),
)),
RpcTest::identity(ApiInfo::chain_get_tipset_req(shared_tipset.key().clone())),
RpcTest::identity(ApiInfo::chain_read_obj_req(*shared_block.cid())),
RpcTest::identity(ApiInfo::chain_get_messages_in_tipset_req(
shared_tipset.key().clone(),
Expand Down

0 comments on commit e8fe286

Please sign in to comment.