From 3264d9a292a093359b05c011542661eab91eb8a0 Mon Sep 17 00:00:00 2001 From: Joe Caulfield Date: Thu, 8 Aug 2024 11:34:27 -0400 Subject: [PATCH] fix tests --- svm/examples/paytube/src/lib.rs | 15 +++++++++++---- svm/examples/paytube/src/processor.rs | 3 ++- svm/examples/paytube/src/settler.rs | 4 +++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/svm/examples/paytube/src/lib.rs b/svm/examples/paytube/src/lib.rs index e08588a65dee06..7549e0261c6866 100644 --- a/svm/examples/paytube/src/lib.rs +++ b/svm/examples/paytube/src/lib.rs @@ -63,7 +63,9 @@ use { crate::{ loader::PayTubeAccountLoader, settler::PayTubeSettler, transaction::PayTubeTransaction, }, - processor::{create_transaction_batch_processor, get_transaction_check_results}, + processor::{ + create_transaction_batch_processor, get_transaction_check_results, PayTubeForkGraph, + }, solana_client::rpc_client::RpcClient, solana_compute_budget::compute_budget::ComputeBudget, solana_sdk::{ @@ -73,7 +75,7 @@ use { solana_svm::transaction_processor::{ TransactionProcessingConfig, TransactionProcessingEnvironment, }, - std::sync::Arc, + std::sync::{Arc, RwLock}, transaction::create_svm_transactions, }; @@ -133,8 +135,13 @@ impl PayTubeChannel { // translated and executed within a provisioned virtual machine, as // well as offers many of the same functionality as the lower-level // Solana runtime. - let processor = - create_transaction_batch_processor(&account_loader, &feature_set, &compute_budget); + let fork_graph = Arc::new(RwLock::new(PayTubeForkGraph {})); + let processor = create_transaction_batch_processor( + &account_loader, + &feature_set, + &compute_budget, + Arc::clone(&fork_graph), + ); // The PayTube transaction processing runtime environment. // diff --git a/svm/examples/paytube/src/processor.rs b/svm/examples/paytube/src/processor.rs index 454958b1577121..71eaccc956826b 100644 --- a/svm/examples/paytube/src/processor.rs +++ b/svm/examples/paytube/src/processor.rs @@ -38,6 +38,7 @@ pub(crate) fn create_transaction_batch_processor>, ) -> TransactionBatchProcessor { let processor = TransactionBatchProcessor::::default(); @@ -45,7 +46,7 @@ pub(crate) fn create_transaction_batch_processor