From 0b715528bb4df7c521fa61ebf43525af7142eb78 Mon Sep 17 00:00:00 2001
From: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Date: Fri, 11 Oct 2024 12:56:57 +0200
Subject: [PATCH] fatp: panic/unimplemented removed

---
 .../src/fork_aware_txpool/fork_aware_txpool.rs             | 7 ++++++-
 .../src/fork_aware_txpool/multi_view_listener.rs           | 6 +-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs
index beb41662353..2adfef5c90e 100644
--- a/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs
+++ b/substrate/client/transaction-pool/src/fork_aware_txpool/fork_aware_txpool.rs
@@ -839,7 +839,12 @@ where
 	) -> Result<Self::Hash, Self::Error> {
 		//todo [#5493]
 		//looks like view_store / view needs non async submit_local method ?.
-		unimplemented!();
+		let e = Err(sc_transaction_pool_api::error::Error::Unactionable.into());
+		log::warn!(
+			target: LOG_TARGET,
+			"LocalTransactionPool::submit_local is not implemented for ForkAwareTxPool, returning error: {e:?}",
+		);
+		e
 	}
 }
 
diff --git a/substrate/client/transaction-pool/src/fork_aware_txpool/multi_view_listener.rs b/substrate/client/transaction-pool/src/fork_aware_txpool/multi_view_listener.rs
index 789931d02b8..4582eff8481 100644
--- a/substrate/client/transaction-pool/src/fork_aware_txpool/multi_view_listener.rs
+++ b/substrate/client/transaction-pool/src/fork_aware_txpool/multi_view_listener.rs
@@ -214,11 +214,7 @@ where
 				} else {
 					Some(status)
 				},
-			TransactionStatus::Retracted(_) => {
-				//todo remove panic / handle event [#5479]
-				panic!("retracted? shall not happen");
-				// false
-			},
+			TransactionStatus::Retracted(_) => None,
 			TransactionStatus::FinalityTimeout(_) => Some(status),
 			TransactionStatus::Finalized(_) => {
 				self.terminate = true;
-- 
GitLab