Last active
March 8, 2024 18:52
-
-
Save aunyks/3887b5b935f2c5774fbea9aa183a78e8 to your computer and use it in GitHub Desktop.
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
def next_block(last_block): | |
this_index = last_block.index + 1 | |
this_timestamp = date.datetime.now() | |
this_data = "Hey! I'm block " + str(this_index) | |
this_hash = last_block.hash | |
return Block(this_index, this_timestamp, this_data, this_hash) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment