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

Function simplicity_eq_256

src/simplicity/jets.c:289–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287
288/* eq_256 : TWO^256 * TWO^256 |- TWO */
289bool simplicity_eq_256(frameItem* dst, frameItem src, const txEnv* env) {
290 (void) env; /* env is unused. */
291 uint32_t arr[16];
292 read32s(arr, 16, &src);
293 for (int i = 0; i < 8; ++i) {
294 if (arr[i] != arr[i+8]) {
295 writeBit(dst, false);
296 return true;
297 }
298 }
299 writeBit(dst, true);
300 return true;
301}
302
303#define FULL_LEFT_SHIFT_(bitsN, bitsM) \
304/* full_left_shift_n_m : TWO^n * TWO^m |- TWO^m * TWO^n */ \

Callers

nothing calls this directly

Calls 2

read32sFunction · 0.85
writeBitFunction · 0.85

Tested by

no test coverage detected