Skip to content

Commit 02ddf9b

Browse files
committed
fix/remove merge-related issues
1 parent 00b3b98 commit 02ddf9b

File tree

3 files changed

+1
-110
lines changed

3 files changed

+1
-110
lines changed

magicblock-committor-service/src/intent_execution_manager/intent_execution_engine.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -823,25 +823,5 @@ mod tests {
823823
async fn cleanup(self) -> Result<(), BufferExecutionError> {
824824
Ok(())
825825
}
826-
827-
async fn fetch_rent_reimbursements(
828-
&self,
829-
pubkeys: &[Pubkey],
830-
) -> TaskInfoFetcherResult<Vec<Pubkey>> {
831-
Ok(pubkeys.iter().map(|_| Pubkey::new_unique()).collect())
832-
}
833-
834-
fn peek_commit_id(&self, _pubkey: &Pubkey) -> Option<u64> {
835-
None
836-
}
837-
838-
fn reset(&self, _: ResetType) {}
839-
840-
async fn get_base_account(
841-
&self,
842-
_pubkey: &Pubkey,
843-
) -> MagicBlockRpcClientResult<Option<Account>> {
844-
Ok(None) // AccountNotFound
845-
}
846826
}
847827
}

magicblock-committor-service/src/intent_executor/mod.rs

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -815,88 +815,3 @@ where
815815
try_join_all(cleanup_futs).await.map(|_| ())
816816
}
817817
}
818-
819-
#[cfg(test)]
820-
mod tests {
821-
use std::{collections::HashMap, sync::Arc};
822-
823-
use magicblock_rpc_client::MagicBlockRpcClientResult;
824-
use solana_account::Account;
825-
use solana_pubkey::Pubkey;
826-
827-
use crate::{
828-
intent_execution_manager::intent_scheduler::create_test_intent,
829-
intent_executor::{
830-
task_info_fetcher::{
831-
ResetType, TaskInfoFetcher, TaskInfoFetcherResult,
832-
},
833-
IntentExecutorImpl,
834-
},
835-
persist::IntentPersisterImpl,
836-
tasks::task_builder::{TaskBuilderImpl, TasksBuilder},
837-
transaction_preparator::TransactionPreparatorImpl,
838-
};
839-
840-
struct MockInfoFetcher;
841-
#[async_trait::async_trait]
842-
impl TaskInfoFetcher for MockInfoFetcher {
843-
async fn fetch_next_commit_ids(
844-
&self,
845-
pubkeys: &[Pubkey],
846-
) -> TaskInfoFetcherResult<HashMap<Pubkey, u64>> {
847-
Ok(pubkeys.iter().map(|pubkey| (*pubkey, 0)).collect())
848-
}
849-
850-
async fn fetch_rent_reimbursements(
851-
&self,
852-
pubkeys: &[Pubkey],
853-
) -> TaskInfoFetcherResult<Vec<Pubkey>> {
854-
Ok(pubkeys.iter().map(|_| Pubkey::new_unique()).collect())
855-
}
856-
857-
fn peek_commit_id(&self, _pubkey: &Pubkey) -> Option<u64> {
858-
Some(0)
859-
}
860-
861-
fn reset(&self, _: ResetType) {}
862-
863-
async fn get_base_account(
864-
&self,
865-
_pubkey: &Pubkey,
866-
) -> MagicBlockRpcClientResult<Option<Account>> {
867-
Ok(None) // AccountNotFound
868-
}
869-
}
870-
871-
#[tokio::test]
872-
async fn test_try_unite() {
873-
let pubkey = [Pubkey::new_unique()];
874-
let intent = create_test_intent(0, &pubkey);
875-
876-
let info_fetcher = Arc::new(MockInfoFetcher);
877-
let commit_task = TaskBuilderImpl::commit_tasks(
878-
&info_fetcher,
879-
&intent,
880-
&None::<IntentPersisterImpl>,
881-
)
882-
.await
883-
.unwrap();
884-
let finalize_task =
885-
TaskBuilderImpl::finalize_tasks(&info_fetcher, &intent)
886-
.await
887-
.unwrap();
888-
889-
let result = IntentExecutorImpl::<
890-
TransactionPreparatorImpl,
891-
MockInfoFetcher,
892-
>::try_unite_tasks(
893-
&commit_task,
894-
&finalize_task,
895-
&Pubkey::new_unique(),
896-
&None::<IntentPersisterImpl>,
897-
);
898-
899-
let strategy = result.unwrap().unwrap();
900-
assert!(strategy.lookup_tables_keys.is_empty());
901-
}
902-
}

magicblock-committor-service/src/tasks/args_task.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
use dlp::{
2-
args::{CallHandlerArgs, CommitDiffArgs, CommitStateArgs},
3-
compute_diff,
4-
};
1+
use dlp::args::CallHandlerArgs;
52
use magicblock_metrics::metrics::LabelValue;
6-
use solana_account::ReadableAccount;
73
use solana_instruction::{AccountMeta, Instruction};
84
use solana_pubkey::Pubkey;
95

0 commit comments

Comments
 (0)