Skip to content

Instantly share code, notes, and snippets.

@bradford-hamilton
Created May 25, 2018 00:51
Show Gist options
  • Save bradford-hamilton/8ba6335eecf13fea7e24e6bd350528c2 to your computer and use it in GitHub Desktop.
Save bradford-hamilton/8ba6335eecf13fea7e24e6bd350528c2 to your computer and use it in GitHub Desktop.
def create(index, timestamp, data, prev_hash)
block = {
index: index,
timestamp: timestamp,
data: data,
prev_hash: prev_hash
}
block.merge({ hash: self.calculate_hash(block) })
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment