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

Function simplicity_copyBits

src/simplicity/frame.c:263–267  ·  view source on GitHub ↗

Given a write frame and a read frame, copy 'n' cells from after the read frame's cursor to after the write frame's cursor, * and then advance the write frame's cursor by 'n'. * Cells in front of the '*dst's cursor's final position may be overwritten. * * Precondition: '*dst' is a valid write frame for 'n' more cells; * '*src' is a valid read frame for 'n' more cells; */

Source from the content-addressed store, hash-verified

261 * '*src' is a valid read frame for 'n' more cells;
262 */
263void simplicity_copyBits(frameItem* dst, const frameItem* src, size_t n) {
264 if (0 == n) return;
265 copyBitsHelper(dst, src, n);
266 dst->offset -= n;
267}

Callers 2

jets.cFile · 0.85
runTCOFunction · 0.85

Calls 1

copyBitsHelperFunction · 0.85

Tested by

no test coverage detected