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

Function reissuanceEntropy

src/simplicity/elements/elementsJets.c:114–120  ·  view source on GitHub ↗

Write an optional 'entropy' from an 'assetIssuance' to the 'dst' frame, advancing the cursor 257 cells. * * Precondition: '*dst' is a valid write frame for 257 more cells; * NULL != issuance; */

Source from the content-addressed store, hash-verified

112 * NULL != issuance;
113 */
114static void reissuanceEntropy(frameItem* dst, const assetIssuance* issuance) {
115 if (writeBit(dst, REISSUANCE == issuance->type)) {
116 writeHash(dst, &issuance->entropy);
117 } else {
118 skipBits(dst, 256);
119 }
120}
121
122/* Write an optional confidential asset amount from an 'assetIssuance' to the 'dst' frame, advancing the cursor 259 cells.
123 *

Calls 3

writeBitFunction · 0.85
skipBitsFunction · 0.85
writeHashFunction · 0.70

Tested by

no test coverage detected