Skip to content

Commit

Permalink
Fix not loading snapshot(must have been using deduplication)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Nov 5, 2024
1 parent b4475bb commit b971db7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions packages/ciphernode/enclave_node/src/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub async fn setup_aggregator(
let read_provider = create_readonly_provider(&ensure_ws_rpc(rpc_url)).await?;
let write_provider =
create_provider_with_signer(&ensure_http_rpc(rpc_url), &signer).await?;

EnclaveSol::attach(
&bus,
&read_provider,
Expand All @@ -59,7 +59,12 @@ pub async fn setup_aggregator(
chain.contracts.enclave.deploy_block(),
)
.await?;
RegistryFilterSol::attach(&bus, &write_provider, &chain.contracts.filter_registry.address()).await?;
RegistryFilterSol::attach(
&bus,
&write_provider,
&chain.contracts.filter_registry.address(),
)
.await?;
CiphernodeRegistrySol::attach(
&bus,
&read_provider,
Expand Down
2 changes: 1 addition & 1 deletion packages/ciphernode/enclave_node/src/ciphernode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub async fn setup_ciphernode(
&read_provider,
&chain.contracts.ciphernode_registry.address(),
&repositories.ciphernode_registry_reader(read_provider.get_chain_id()),
chain.contracts.ciphernode_registry.deploy_block()
chain.contracts.ciphernode_registry.deploy_block(),
)
.await?;
}
Expand Down
4 changes: 3 additions & 1 deletion packages/ciphernode/evm/src/event_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ where
start_block: Option<u64>,
/// Event bus for error propagation
bus: Addr<EventBus>,
/// The in memory state of the event reader
state: EvmEventReaderState,
/// Repository to save the state of the event reader
repository: Repository<EvmEventReaderState>,
}

Expand Down Expand Up @@ -122,7 +124,7 @@ where
bus: bus.clone(),
repository: repository.clone(),
};
let addr = EvmEventReader::new(params).start();
let addr = EvmEventReader::load(params).await?.start();

bus.do_send(Subscribe::new("Shutdown", addr.clone().into()));

Expand Down

0 comments on commit b971db7

Please sign in to comment.