View definition

func UpdateBlockTime

Defined in


UpdateBlockTime updates the timestamp in the header of the passed block to the current time while taking into account the median time of the last several blocks to ensure the new time is after that time per the chain consensus rules. Finally, it will update the target difficulty if needed based on the new time for the test networks since their target difficulty can change based upon time.

UpdateBlockTime is referenced in 1 repository