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

Function initWriteFrame

src/simplicity/frame.h:47–49  ·  view source on GitHub ↗

Initialize a new write frame. * 'n' is the number of cells for the write frame. * 'from' is a pointer to the one-past-the-end of the new slice for the array of UWORDS to hold the frame's cells. * * Precondition: UWORD (from - ROUND_UWORD(n))[ROUND_UWORD(n)]; */

Source from the content-addressed store, hash-verified

45 * Precondition: UWORD (from - ROUND_UWORD(n))[ROUND_UWORD(n)];
46 */
47static inline frameItem initWriteFrame(size_t n, UWORD* from) {
48 return (frameItem){ .edge = from - ROUND_UWORD(n), .offset = n };
49}
50
51/* Given a read frame, return the value of the cell at the cursor.
52 *

Callers 3

test_hashBlockFunction · 0.85
runTCOFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_hashBlockFunction · 0.68