MCPcopy Create free account
hub / github.com/ChainSafe/Delorean-Protocol / to_finalize_block

Function to_finalize_block

fendermint/app/src/tmconv.rs:152–166  ·  view source on GitHub ↗
(
    ret: FvmApplyRet,
    tx_results: Vec<ExecTxResult>,
    power_table: PowerUpdates,
    app_hash: AppHash,
)

Source from the content-addressed store, hash-verified

150}
151
152pub fn to_finalize_block(
153 ret: FvmApplyRet,
154 tx_results: Vec<ExecTxResult>,
155 power_table: PowerUpdates,
156 app_hash: AppHash,
157) -> anyhow::Result<response::FinalizeBlock> {
158 Ok(response::FinalizeBlock {
159 events: to_events("event", ret.apply_ret.events, ret.emitters),
160 tx_results,
161 validator_updates: to_validator_updates(power_table.0)
162 .context("failed to convert validator updates")?,
163 consensus_param_updates: Default::default(),
164 app_hash,
165 })
166}
167
168/// Convert events to key-value pairs.
169///

Callers 1

finalize_blockMethod · 0.85

Calls 3

to_eventsFunction · 0.85
to_validator_updatesFunction · 0.85
contextMethod · 0.80

Tested by

no test coverage detected