-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make block timestamp repr time block found
Closes #149. The mining loop now updates block_header.timestamp with current time before calculating each digest. This means that the timestamp will represent the moment a block is found, rather than the moment mining started, as it was before. Changes: * adds Block::set_header_timestamp() * call Block::set_header_timestamp(Timestamp::now()) in mining loop The test `block_timestamp_represents_time_block_found()` now passes.
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters