Skip to content

Commit 3dd61ad

Browse files
committed
fix: revert timestamp change
In practice, this situation is unlikely to happen, since the timestamp is set before mining begins. Setting it to the parent timestamp + 1 causes problems in some tests that rely on quickly producing blocks.
1 parent f4038eb commit 3dd61ad

File tree

1 file changed

+1
-1
lines changed
  • stackslib/src/chainstate/nakamoto

1 file changed

+1
-1
lines changed

stackslib/src/chainstate/nakamoto/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ impl NakamotoBlockHeader {
944944
parent_block_id,
945945
tx_merkle_root: Sha512Trunc256Sum([0u8; 32]),
946946
state_index_root: TrieHash([0u8; 32]),
947-
timestamp: std::cmp::max(parent_timestamp.saturating_add(1), get_epoch_time_secs()),
947+
timestamp: std::cmp::max(parent_timestamp, get_epoch_time_secs()),
948948
miner_signature: MessageSignature::empty(),
949949
signer_signature: vec![],
950950
pox_treatment: BitVec::ones(bitvec_len)

0 commit comments

Comments
 (0)