Skip to content

Commit

Permalink
Merge pull request #70 from danMove/main
Browse files Browse the repository at this point in the history
Fix issue #65:wrong timestamp on chain
  • Loading branch information
l-monninger authored Nov 13, 2023
2 parents ff41066 + e1c6862 commit 8f4779b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions m1/subnet/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1417,6 +1417,7 @@ impl ChainVm for Vm
if let Some(state_b) = vm_state.state.as_ref() {
let prnt_blk = state_b.get_block(&vm_state.preferred).await.unwrap();
let unix_now = Utc::now().timestamp() as u64;
let unix_micro = Utc::now().timestamp_micros() as u64;
let tx_arr = self.get_pending_tx(10000).await;
println!("----build_block pool tx count-------{}------", tx_arr.clone().len());
let executor = self.executor.as_ref().unwrap().read().await;
Expand All @@ -1432,7 +1433,7 @@ impl ChainVm for Vm
signer.author(),
vec![],
vec![],
unix_now,
unix_micro,
));
let mut txs = vec![];
for tx in tx_arr.iter() {
Expand All @@ -1448,7 +1449,7 @@ impl ChainVm for Vm
block_id.clone(),
parent_block_id,
next_epoch,
unix_now);
unix_micro);

let mut block_ = Block::new(
prnt_blk.id(),
Expand Down

0 comments on commit 8f4779b

Please sign in to comment.