Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
FM-191: Move the actor bundle path into AppConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
aakoshh committed Aug 18, 2023
1 parent 6bbea07 commit cf40584
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions fendermint/app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ pub struct AppConfig<S: KVStore> {
pub state_hist_namespace: S::Namespace,
/// Size of state history to keep; 0 means unlimited.
pub state_hist_size: u64,
/// Path to the Wasm bundle.
///
/// Only loaded once during genesis; later comes from the [`StateTree`].
pub builtin_actors_bundle: PathBuf,
}

/// Handle ABCI requests.
Expand Down Expand Up @@ -153,15 +157,14 @@ where
config: AppConfig<S>,
db: DB,
state_store: SS,
builtin_actors_bundle: PathBuf,
interpreter: I,
resolve_pool: CheckpointPool,
) -> Result<Self> {
let app = Self {
db: Arc::new(db),
state_store: Arc::new(state_store),
multi_engine: Arc::new(MultiEngine::new(1)),
builtin_actors_bundle,
builtin_actors_bundle: config.builtin_actors_bundle,
namespace: config.app_namespace,
state_hist: KVCollection::new(config.state_hist_namespace),
state_hist_size: config.state_hist_size,
Expand Down
2 changes: 1 addition & 1 deletion fendermint/app/src/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ async fn run(settings: Settings) -> anyhow::Result<()> {
app_namespace: ns.app,
state_hist_namespace: ns.state_hist,
state_hist_size: settings.db.state_hist_size,
builtin_actors_bundle: settings.builtin_actors_bundle(),
},
db,
state_store,
settings.builtin_actors_bundle(),
interpreter,
resolve_pool,
)?;
Expand Down

0 comments on commit cf40584

Please sign in to comment.