From 2f1ad07bf369d3e4d4de1eaf6170255120c15a30 Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Tue, 19 Nov 2024 18:21:47 +0100 Subject: [PATCH 1/2] Add adapter type for NodePrimitives::Receipt --- crates/primitives-traits/src/lib.rs | 2 +- crates/primitives-traits/src/node.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/primitives-traits/src/lib.rs b/crates/primitives-traits/src/lib.rs index 819825d635f1..2768ea390288 100644 --- a/crates/primitives-traits/src/lib.rs +++ b/crates/primitives-traits/src/lib.rs @@ -80,7 +80,7 @@ pub use size::InMemorySize; /// Node traits pub mod node; -pub use node::{FullNodePrimitives, NodePrimitives}; +pub use node::{FullNodePrimitives, NodePrimitives, Rcpt}; /// Helper trait that requires arbitrary implementation if the feature is enabled. #[cfg(any(feature = "test-utils", feature = "arbitrary"))] diff --git a/crates/primitives-traits/src/node.rs b/crates/primitives-traits/src/node.rs index c11a19a105a8..2ebe490eddf5 100644 --- a/crates/primitives-traits/src/node.rs +++ b/crates/primitives-traits/src/node.rs @@ -73,3 +73,6 @@ where type TxType = T::TxType; type Receipt = T::Receipt; } + +/// Helper adapter type for accessing [`NodePrimitives`] receipt type. +pub type Rcpt = ::Receipt; From 8078e8e505c127ddf75aea48f56513a9087458af Mon Sep 17 00:00:00 2001 From: Emilia Hane Date: Tue, 19 Nov 2024 18:27:15 +0100 Subject: [PATCH 2/2] Rename Rcpt to ReceiptTy --- crates/primitives-traits/src/lib.rs | 2 +- crates/primitives-traits/src/node.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/primitives-traits/src/lib.rs b/crates/primitives-traits/src/lib.rs index 2768ea390288..79dff4ae36bf 100644 --- a/crates/primitives-traits/src/lib.rs +++ b/crates/primitives-traits/src/lib.rs @@ -80,7 +80,7 @@ pub use size::InMemorySize; /// Node traits pub mod node; -pub use node::{FullNodePrimitives, NodePrimitives, Rcpt}; +pub use node::{FullNodePrimitives, NodePrimitives, ReceiptTy}; /// Helper trait that requires arbitrary implementation if the feature is enabled. #[cfg(any(feature = "test-utils", feature = "arbitrary"))] diff --git a/crates/primitives-traits/src/node.rs b/crates/primitives-traits/src/node.rs index 2ebe490eddf5..180920d39345 100644 --- a/crates/primitives-traits/src/node.rs +++ b/crates/primitives-traits/src/node.rs @@ -75,4 +75,4 @@ where } /// Helper adapter type for accessing [`NodePrimitives`] receipt type. -pub type Rcpt = ::Receipt; +pub type ReceiptTy = ::Receipt;