MCPcopy Create free account
hub / github.com/ElementsProject/elements / imrIV

Function imrIV

src/simplicity/dag.c:45–49  ·  view source on GitHub ↗

Given a tag for a node, return the SHA-256 hash of its associated IMR tag. * This is the "initial value" for computing the commitment Merkle root for that expression. * * Precondition: 'tag' \notin {HIDDEN, JET, WORD} */

Source from the content-addressed store, hash-verified

43 * Precondition: 'tag' \notin {HIDDEN, JET, WORD}
44 */
45static sha256_midstate imrIV(tag_t tag) {
46 return DISCONNECT == tag ? imr_disconnectIV
47 : WITNESS == tag ? imr_witnessIV
48 : cmrIV(tag);
49}
50
51/* Given a tag for a node, return the SHA-256 hash of its associated AMR tag.
52 * This is the "initial value" for computing the annotated Merkle root for that expression.

Callers 1

computeIdentityHashRootsFunction · 0.85

Calls 1

cmrIVFunction · 0.85

Tested by

no test coverage detected