mirror of
https://github.com/tig-pool-nk/tig-monorepo.git
synced 2026-03-07 19:27:21 +08:00
20 lines
670 B
Rust
20 lines
670 B
Rust
pub mod context;
|
|
mod contracts;
|
|
use context::*;
|
|
|
|
pub use contracts::{
|
|
algorithms::{submit_advance, submit_binary, submit_code},
|
|
benchmarks::{submit_benchmark, submit_precommit, submit_proof},
|
|
players::{set_coinbase, set_delegatees, set_reward_share, set_vote},
|
|
};
|
|
|
|
pub async fn add_block<T: Context>(ctx: &T) {
|
|
let mut cache = ctx.build_block_cache().await;
|
|
contracts::players::update(&mut cache).await;
|
|
contracts::opow::update(&mut cache).await;
|
|
contracts::algorithms::update(&mut cache).await;
|
|
contracts::challenges::update(&mut cache).await;
|
|
contracts::rewards::update(&mut cache).await;
|
|
ctx.commit_block_cache(cache).await;
|
|
}
|