mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 09:57:56 +00:00
Move transactions protocol to its own crate (#12264)
* Move transaction protocol to its own crate * Update Cargo.lock * Fix binaries * Update client/network/transactions/src/lib.rs Co-authored-by: Dmitry Markin <dmitry@markin.tech> * Update client/service/src/builder.rs Co-authored-by: Bastian Köcher <info@kchr.de> * Apply review comments * Revert one change and apply cargo-fmt * Remove Transaction from Message * Add array-bytes * trigger CI * Add comment about codec index Co-authored-by: Dmitry Markin <dmitry@markin.tech> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
@@ -36,9 +36,6 @@ pub type Message<B> = generic::Message<
|
||||
<B as BlockT>::Extrinsic,
|
||||
>;
|
||||
|
||||
/// A set of transactions.
|
||||
pub type Transactions<E> = Vec<E>;
|
||||
|
||||
/// Remote call response.
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)]
|
||||
pub struct RemoteCallResponse {
|
||||
@@ -59,7 +56,7 @@ pub struct RemoteReadResponse {
|
||||
|
||||
/// Generic types.
|
||||
pub mod generic {
|
||||
use super::{RemoteCallResponse, RemoteReadResponse, Transactions};
|
||||
use super::{RemoteCallResponse, RemoteReadResponse};
|
||||
use bitflags::bitflags;
|
||||
use codec::{Decode, Encode, Input, Output};
|
||||
use sc_client_api::StorageProof;
|
||||
@@ -146,9 +143,10 @@ pub mod generic {
|
||||
BlockResponse(BlockResponse<Header, Hash, Extrinsic>),
|
||||
/// Block announce.
|
||||
BlockAnnounce(BlockAnnounce<Header>),
|
||||
/// Transactions.
|
||||
Transactions(Transactions<Extrinsic>),
|
||||
/// Consensus protocol message.
|
||||
// NOTE: index is incremented by 1 due to transaction-related
|
||||
// message that was removed
|
||||
#[codec(index = 6)]
|
||||
Consensus(ConsensusMessage),
|
||||
/// Remote method call request.
|
||||
RemoteCallRequest(RemoteCallRequest<Hash>),
|
||||
|
||||
Reference in New Issue
Block a user