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

Function simplicity_output_nonce

src/simplicity/elements/elementsJets.c:403–411  ·  view source on GitHub ↗

output_nonce : TWO^32 |- S (S (Conf TWO^256)) */

Source from the content-addressed store, hash-verified

401
402/* output_nonce : TWO^32 |- S (S (Conf TWO^256)) */
403bool simplicity_output_nonce(frameItem* dst, frameItem src, const txEnv* env) {
404 uint_fast32_t i = simplicity_read32(&src);
405 if (writeBit(dst, i < env->tx->numOutputs)) {
406 nonce(dst, &env->tx->output[i].nonce);
407 } else {
408 skipBits(dst, 259);
409 }
410 return true;
411}
412
413/* output_script_hash : TWO^32 |- S TWO^256 */
414bool simplicity_output_script_hash(frameItem* dst, frameItem src, const txEnv* env) {

Callers

nothing calls this directly

Calls 3

writeBitFunction · 0.85
nonceFunction · 0.85
skipBitsFunction · 0.85

Tested by

no test coverage detected