mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-15 18:25:43 +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
@@ -94,6 +94,7 @@ where
|
||||
MessagesProof = SubstrateMessagesProof<C>,
|
||||
SourceHeaderNumber = <C::Header as HeaderT>::Number,
|
||||
SourceHeaderHash = <C::Header as HeaderT>::Hash,
|
||||
SourceChain = C,
|
||||
>,
|
||||
P::TargetHeaderNumber: Decode,
|
||||
P::TargetHeaderHash: Decode,
|
||||
@@ -197,13 +198,16 @@ where
|
||||
generated_at_block: TargetHeaderIdOf<P>,
|
||||
proof: P::MessagesReceivingProof,
|
||||
) -> Result<(), SubstrateError> {
|
||||
let tx = self
|
||||
.lane
|
||||
.make_messages_receiving_proof_transaction(generated_at_block, proof)
|
||||
self.client
|
||||
.submit_signed_extrinsic(self.lane.source_transactions_author(), move |transaction_nonce| {
|
||||
self.lane
|
||||
.make_messages_receiving_proof_transaction(transaction_nonce, generated_at_block, proof)
|
||||
})
|
||||
.await?;
|
||||
self.client.submit_extrinsic(Bytes(tx.encode())).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn activate_target_to_source_headers_relay(&self, _activate: bool) {}
|
||||
}
|
||||
|
||||
pub async fn read_client_state<SelfChain, BridgedHeaderHash, BridgedHeaderNumber>(
|
||||
|
||||
Reference in New Issue
Block a user