View Source ProofOfReserves.MerkleSumTree.Node (proof_of_reserves v0.1.0)
Node represents a node in a Merkle Sum Tree. It has a hash and a value.
Summary
Functions
merkleize_nodes takes two nodes and combines them into a new node.
new creates a new node with the given hash and value.
parse_node parses a string of "hash,value" into a Node. value is trimmed of leading and trailing whitespace before being converted to an integer.
serialize_node serializes a node into a string of "hash,value".
Types
@type t() :: %ProofOfReserves.MerkleSumTree.Node{ hash: binary(), value: non_neg_integer() }
Functions
merkleize_nodes takes two nodes and combines them into a new node.
@spec new(binary(), non_neg_integer()) :: t()
new creates a new node with the given hash and value.
parse_node parses a string of "hash,value" into a Node. value is trimmed of leading and trailing whitespace before being converted to an integer.
serialize_node serializes a node into a string of "hash,value".