diff --git a/crates/iota-core/src/authority.rs b/crates/iota-core/src/authority.rs index b783c447b90..5c3cffca18b 100644 --- a/crates/iota-core/src/authority.rs +++ b/crates/iota-core/src/authority.rs @@ -4980,15 +4980,6 @@ impl TransactionKeyValueStoreTrait for AuthorityState { Ok((summaries, contents, summaries_by_digest, contents_by_digest)) } - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult> { - self.get_checkpoint_cache() - .deprecated_get_transaction_checkpoint(&digest) - .map(|res| res.map(|(_epoch, checkpoint)| checkpoint)) - } - async fn get_object( &self, object_id: ObjectID, diff --git a/crates/iota-json-rpc/src/coin_api.rs b/crates/iota-json-rpc/src/coin_api.rs index 7d190781c82..c28e89c67e8 100644 --- a/crates/iota-json-rpc/src/coin_api.rs +++ b/crates/iota-json-rpc/src/coin_api.rs @@ -466,11 +466,6 @@ mod tests { checkpoint_contents_by_digest: &[CheckpointContentsDigest], ) -> IotaResult; - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult>; - async fn get_object(&self, object_id: ObjectID, version: SequenceNumber) -> IotaResult>; async fn multi_get_transaction_checkpoint( diff --git a/crates/iota-json-rpc/src/read_api.rs b/crates/iota-json-rpc/src/read_api.rs index 7fa809d3832..37e33100b9f 100644 --- a/crates/iota-json-rpc/src/read_api.rs +++ b/crates/iota-json-rpc/src/read_api.rs @@ -788,12 +788,13 @@ impl ReadApiServer for ReadApi { temp_response.checkpoint_seq = self .transaction_kv_store - .deprecated_get_transaction_checkpoint(digest) + .multi_get_transaction_checkpoint(&Vec::from([digest])) .await - .map_err(|e| { + .tap_err(|e| { error!("Failed to retrieve checkpoint sequence for transaction {digest:?} with error: {e:?}"); - Error::from(e) - })?; + })? + .pop() + .unwrap(); if let Some(checkpoint_seq) = &temp_response.checkpoint_seq { let kv_store = self.transaction_kv_store.clone(); diff --git a/crates/iota-storage/src/http_key_value_store.rs b/crates/iota-storage/src/http_key_value_store.rs index 431362c1f4e..00cd44b8cf5 100644 --- a/crates/iota-storage/src/http_key_value_store.rs +++ b/crates/iota-storage/src/http_key_value_store.rs @@ -411,17 +411,6 @@ impl TransactionKeyValueStoreTrait for HttpKVStore { )) } - #[instrument(level = "trace", skip_all)] - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult> { - let key = Key::TxToCheckpoint(digest); - self.fetch(key).await.map(|maybe| { - maybe.and_then(|bytes| deser::<_, CheckpointSequenceNumber>(&key, bytes.as_ref())) - }) - } - #[instrument(level = "trace", skip_all)] async fn get_object( &self, diff --git a/crates/iota-storage/src/key_value_store.rs b/crates/iota-storage/src/key_value_store.rs index 6040313f19b..69194a98832 100644 --- a/crates/iota-storage/src/key_value_store.rs +++ b/crates/iota-storage/src/key_value_store.rs @@ -403,15 +403,6 @@ impl TransactionKeyValueStore { }) } - pub async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult> { - self.inner - .deprecated_get_transaction_checkpoint(digest) - .await - } - pub async fn get_object( &self, object_id: ObjectID, @@ -452,11 +443,6 @@ pub trait TransactionKeyValueStoreTrait { checkpoint_contents_by_digest: &[CheckpointContentsDigest], ) -> IotaResult; - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult>; - async fn get_object( &self, object_id: ObjectID, @@ -588,24 +574,6 @@ impl TransactionKeyValueStoreTrait for FallbackTransactionKVStore { Ok((res.0, res.1, res.2, res.3)) } - #[instrument(level = "trace", skip_all)] - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult> { - let mut res = self - .primary - .deprecated_get_transaction_checkpoint(digest) - .await?; - if res.is_none() { - res = self - .fallback - .deprecated_get_transaction_checkpoint(digest) - .await?; - } - Ok(res) - } - #[instrument(level = "trace", skip_all)] async fn get_object( &self, diff --git a/crates/iota-storage/tests/key_value_tests.rs b/crates/iota-storage/tests/key_value_tests.rs index f71ee6e9cbb..f1e528de92b 100644 --- a/crates/iota-storage/tests/key_value_tests.rs +++ b/crates/iota-storage/tests/key_value_tests.rs @@ -215,13 +215,6 @@ impl TransactionKeyValueStoreTrait for MockTxStore { Ok((summaries, contents, summaries_by_digest, contents_by_digest)) } - async fn deprecated_get_transaction_checkpoint( - &self, - digest: TransactionDigest, - ) -> IotaResult> { - Ok(self.tx_to_checkpoint.get(&digest).cloned()) - } - async fn get_object( &self, object_id: ObjectID,