mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 01:41:03 +00:00
on-demand headers relay (#833)
* on-demand headers relay * bool::then * move file * atomic submit_signed_extrinsic * remove cli options from future * test on-demand relay * TODOs * fixed initialization call for Westend -> Millau * Update relays/client-substrate/src/client.rs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com> * removed on_demand_headers_relay.rs * on_demand_headers_relay traces * fix compilation * fmt * docs Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
51fc83941b
commit
4e4e9a8e4e
@@ -90,6 +90,7 @@ where
|
||||
C::Index: DeserializeOwned,
|
||||
<C::Header as HeaderT>::Number: BlockNumberBase,
|
||||
P: SubstrateMessageLane<
|
||||
TargetChain = C,
|
||||
MessagesReceivingProof = SubstrateMessagesReceivingProof<C>,
|
||||
TargetHeaderNumber = <C::Header as HeaderT>::Number,
|
||||
TargetHeaderHash = <C::Header as HeaderT>::Hash,
|
||||
@@ -183,11 +184,18 @@ where
|
||||
nonces: RangeInclusive<MessageNonce>,
|
||||
proof: P::MessagesProof,
|
||||
) -> Result<RangeInclusive<MessageNonce>, SubstrateError> {
|
||||
let tx = self
|
||||
.lane
|
||||
.make_messages_delivery_transaction(generated_at_header, nonces.clone(), proof)
|
||||
self.client
|
||||
.submit_signed_extrinsic(self.lane.target_transactions_author(), |transaction_nonce| {
|
||||
self.lane.make_messages_delivery_transaction(
|
||||
transaction_nonce,
|
||||
generated_at_header,
|
||||
nonces.clone(),
|
||||
proof,
|
||||
)
|
||||
})
|
||||
.await?;
|
||||
self.client.submit_extrinsic(Bytes(tx.encode())).await?;
|
||||
Ok(nonces)
|
||||
}
|
||||
|
||||
async fn activate_source_to_target_headers_relay(&self, _activate: bool) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user