mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Merge txpool-runtime-api with txpool-api (#4320)
* Remove transaction-pool-runtime-api * Merge runtime-api with transaction-pool.
This commit is contained in:
committed by
Bastian Köcher
parent
70db5da6c4
commit
3805393a13
@@ -26,7 +26,7 @@ use client_api::{
|
||||
};
|
||||
use primitives::{H256, Blake2Hasher, Hasher};
|
||||
use sp_runtime::{generic::BlockId, traits::{self, Block as BlockT}, transaction_validity::TransactionValidity};
|
||||
use txpool_runtime_api::TaggedTransactionQueue;
|
||||
use txpool_api::runtime_api::TaggedTransactionQueue;
|
||||
|
||||
use crate::error::{self, Error};
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
//! Transaction pool error.
|
||||
|
||||
use txpool_api::error::Error as TxPoolError;
|
||||
|
||||
/// Transaction pool result.
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
@@ -23,7 +25,7 @@ pub type Result<T> = std::result::Result<T, Error>;
|
||||
#[derive(Debug, derive_more::Display, derive_more::From)]
|
||||
pub enum Error {
|
||||
/// Pool error.
|
||||
Pool(txpool_api::error::Error),
|
||||
Pool(TxPoolError),
|
||||
/// Blockchain error.
|
||||
Blockchain(sp_blockchain::Error),
|
||||
/// Error while converting a `BlockId`.
|
||||
@@ -45,8 +47,8 @@ impl std::error::Error for Error {
|
||||
}
|
||||
}
|
||||
|
||||
impl txpool_api::IntoPoolError for Error {
|
||||
fn into_pool_error(self) -> std::result::Result<txpool_api::error::Error, Self> {
|
||||
impl txpool_api::error::IntoPoolError for Error {
|
||||
fn into_pool_error(self) -> std::result::Result<TxPoolError, Self> {
|
||||
match self {
|
||||
Error::Pool(e) => Ok(e),
|
||||
e => Err(e),
|
||||
|
||||
@@ -37,7 +37,7 @@ use sp_runtime::{
|
||||
};
|
||||
use sp_blockchain::HeaderBackend;
|
||||
use txpool_api::TransactionPoolMaintainer;
|
||||
use txpool_runtime_api::TaggedTransactionQueue;
|
||||
use txpool_api::runtime_api::TaggedTransactionQueue;
|
||||
|
||||
use txpool::{self, ChainApi};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user