Skip to content

Commit

Permalink
[service] add more comments for clean up of the api-client types
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Sep 15, 2023
1 parent 78859f0 commit fdf4e2e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion service/src/parentchain_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ pub(crate) struct ParentchainHandler<ParentchainApi, EnclaveApi> {
parentchain_init_params: ParentchainInitParams,
}

// #TODO: #1451: Reintroduce `ParentchainApi: ChainApi` once there is no trait bound conflict
// any more with the api-clients own trait definitions.
impl<EnclaveApi> ParentchainHandler<ParentchainApi, EnclaveApi>
where
EnclaveApi: EnclaveBase,
Expand Down Expand Up @@ -98,14 +100,22 @@ where
(
id,
GrandpaParams::new(
// #TODO: #1451: clean up type hacks
Header::decode(&mut genesis_header.encode().as_slice())?,
authority_list.into(),
grandpa_proof,
),
)
.into()
} else {
(id, SimpleParams::new(Header::decode(&mut genesis_header.encode().as_slice())?)).into()
(
id,
SimpleParams::new(
// #TODO: #1451: clean up type hacks
Header::decode(&mut genesis_header.encode().as_slice())?,
),
)
.into()
};

Ok(Self::new(parentchain_api, enclave_api, parentchain_init_params))
Expand Down

0 comments on commit fdf4e2e

Please sign in to comment.