Skip to content

Commit

Permalink
auction: write auction parameters on bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Apr 23, 2024
1 parent a3a6cbe commit b6a4317
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/core/component/auction/src/component/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ impl Component for Auction {
// addition easy to do.
type AppState = crate::genesis::Content;

#[instrument(name = "auction", skip(_state, app_state))]
async fn init_chain<S: StateWrite>(_state: S, app_state: Option<&Self::AppState>) {
#[instrument(name = "auction", skip(state, app_state))]
async fn init_chain<S: StateWrite>(mut state: S, app_state: Option<&Self::AppState>) {
match app_state {
None => { /* perform upgrade specific check */ }
Some(_) => {}
Some(content) => {
state.put_auction_params(content.auction_params.clone());
}
}
}

Expand Down

0 comments on commit b6a4317

Please sign in to comment.