Skip to content

Commit

Permalink
Write LQT Funding Parameters to the chain state on bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Jan 29, 2025
1 parent 8088954 commit 4af0be1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/core/component/funding/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use cnidarium_component::Component;
use tendermint::v0_37::abci;
use tracing::instrument;

use crate::{event::EventFundingStreamReward, genesis};
use crate::{event::EventFundingStreamReward, genesis, FundingParameters};

pub struct Funding {}

Expand All @@ -30,7 +30,9 @@ impl Component for Funding {
#[instrument(name = "funding", skip(state, app_state))]
async fn init_chain<S: StateWrite>(mut state: S, app_state: Option<&Self::AppState>) {
match app_state {
None => { /* Checkpoint -- no-op */ }
None => {
state.put_funding_params(FundingParameters::default());
}
Some(genesis) => {
state.put_funding_params(genesis.funding_params.clone());
}
Expand Down

0 comments on commit 4af0be1

Please sign in to comment.