Skip to content

Commit

Permalink
add no assert for epoch.move
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhhuang committed Apr 23, 2024
1 parent d971d42 commit b150d64
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ starcoin-crypto = { git = "https://github.com/starcoinorg/starcoin-crypto", rev
starcoin-decrypt = { path = "commons/decrypt" }
starcoin-dev = { path = "vm/dev" }
starcoin-executor = { path = "executor" }
starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "0022ed2d517b3ca59eebd49975817ef5a3acbc69" }
starcoin-framework = { git = "https://github.com/starcoinorg/starcoin-framework", rev = "4dab7b10849d862459fb35c8539640a9b7b3ac2a" }
starcoin-genesis = { path = "genesis" }
starcoin-logger = { path = "commons/logger" }
starcoin-metrics = { path = "commons/metrics" }
Expand Down
3 changes: 3 additions & 0 deletions miner/src/create_block_template/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ impl ServiceHandler<Self, BlockTemplateRequest> for BlockBuilderService {
_msg: BlockTemplateRequest,
_ctx: &mut ServiceContext<BlockBuilderService>,
) -> Result<BlockTemplateResponse> {
info!("jacktest: call create block template");
let template = self.inner.create_block_template();
self.inner.uncles_prune();
template
Expand Down Expand Up @@ -307,6 +308,7 @@ where
}

pub fn create_block_template(&self) -> Result<BlockTemplateResponse> {
info!("jacktest: call create block template1");
let on_chain_block_gas_limit = self.chain.epoch().block_gas_limit();
let block_gas_limit = self
.local_block_gas_limit
Expand Down Expand Up @@ -413,6 +415,7 @@ where
self.tx_provider.remove_invalid_txn(invalid_txn.id());
}

info!("jacktest: create template: previous header: {:?}, template: {:?}", previous_header, template);
Ok(BlockTemplateResponse {
parent: previous_header,
template,
Expand Down
3 changes: 2 additions & 1 deletion miner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,10 @@ impl MinerService {
//if block time gap > 3600, force create a empty block for fix https://github.com/starcoinorg/starcoin/issues/3036
&& block_time_gap < MAX_BLOCK_TIME_GAP)
{
debug!("The flag disable_mint_empty_block is true and no txn in pool, so skip mint empty block.");
info!("The flag disable_mint_empty_block is true and no txn in pool, so skip mint empty block.");
Ok(())
} else {
info!("jacktest mint block event dispatching");
self.dispatch_mint_block_event(ctx, block_template)
}
}
Expand Down
Binary file modified vm/stdlib/compiled/latest/stdlib/059_Epoch.mv
Binary file not shown.

0 comments on commit b150d64

Please sign in to comment.