Last active
September 12, 2020 12:45
-
-
Save yatender-oktalk/0481bdfcb1ea94d3314a1a1a0e7d1dde 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
defmodule ExChain.BlockChain.Block do | |
@moduledoc """ | |
This module is the single block struct in a blockchain | |
""" | |
alias __MODULE__ | |
@type t :: %Block{ | |
timestamp: pos_integer(), | |
last_hash: String.t(), | |
hash: String.t(), | |
data: any() | |
} | |
defstruct ~w(timestamp last_hash hash data)a | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment