Skip to content

Commit

Permalink
impl TypeInfo for TxPoolResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavcpawar committed Aug 3, 2023
1 parent 0eacafe commit 5e102fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions primitives/rpc/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ethereum = { workspace = true, default-features = false, features = [ "with-code

# Substrate
parity-scale-codec = { workspace = true, default-features = false }
scale-info = { workspace = true, features = [ "derive" ]}
sp-api = { workspace = true, default-features = false }
sp-io = { workspace = true, default-features = false }
sp-runtime = { workspace = true, default-features = false }
Expand All @@ -21,6 +22,7 @@ sp-std = { workspace = true, default-features = false }
default = [ "std" ]
std = [
"ethereum/std",
"scale-info/std",
"sp-api/std",
"sp-io/std",
"sp-runtime/std",
Expand Down
6 changes: 4 additions & 2 deletions primitives/rpc/txpool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
use parity_scale_codec::{Decode, Encode};
pub use ethereum::{TransactionV0 as LegacyTransaction, TransactionV2 as Transaction};
use sp_runtime::traits::Block as BlockT;
use sp_runtime::scale_info::TypeInfo;
use sp_runtime::RuntimeDebug;
use sp_std::vec::Vec;

#[derive(Eq, PartialEq, Clone, Encode, Decode, sp_runtime::RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
pub struct TxPoolResponseLegacy {
pub ready: Vec<LegacyTransaction>,
pub future: Vec<LegacyTransaction>,
}

#[derive(Eq, PartialEq, Clone, Encode, Decode, sp_runtime::RuntimeDebug)]
#[derive(Eq, PartialEq, Clone, Encode, Decode, RuntimeDebug, TypeInfo)]
pub struct TxPoolResponse {
pub ready: Vec<Transaction>,
pub future: Vec<Transaction>,
Expand Down

0 comments on commit 5e102fa

Please sign in to comment.