Skip to content

Commit

Permalink
fix: errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtftr committed Feb 27, 2025
1 parent 62d545f commit 9d12a43
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions core/src/states/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::builder::transaction::OperatorData;
use crate::builder::transaction::{OperatorData, TransactionType, TxHandler};
use crate::config::protocol::ProtocolParamset;
use crate::database::Database;
use crate::errors::BridgeError;
Expand Down Expand Up @@ -193,11 +193,16 @@ pub struct StateManager<T: Owner> {
impl<T: Owner> StateManager<T> {
pub fn new(db: Database, handler: T, paramset: &'static ProtocolParamset) -> Self {
Self {
db,
owner: handler,
round_machines: Vec::new(),
kickoff_machines: Vec::new(),
context: StateContext::new(db, handler, Default::default(), paramset),
context: StateContext::new(
db.clone(),
Arc::new(handler.clone()),
Default::default(),
paramset,
),
db,
owner: handler,
paramset,
}
}
Expand Down Expand Up @@ -270,7 +275,7 @@ impl<T: Owner> StateManager<T> {

// Enhanced method for parallel processing
pub async fn process_block_parallel(&mut self, block: &Block) -> Result<(), BridgeError> {
let cache: BlockCache = Default::default();
let mut cache: BlockCache = Default::default();
cache.update_with_block(block);

// Create a base context with updated cache
Expand Down

0 comments on commit 9d12a43

Please sign in to comment.