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

Function simplicity_input_pegin

src/simplicity/elements/elementsJets.c:206–218  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

204
205/* input_pegin : TWO^32 |- S (S TWO^256) */
206bool simplicity_input_pegin(frameItem* dst, frameItem src, const txEnv* env) {
207 uint_fast32_t i = simplicity_read32(&src);
208 if (writeBit(dst, i < env->tx->numInputs)) {
209 if (writeBit(dst, env->tx->input[i].isPegin)) {
210 writeHash(dst, &env->tx->input[i].pegin);
211 } else {
212 skipBits(dst, 256);
213 }
214 } else {
215 skipBits(dst, 257);
216 }
217 return true;
218}
219
220/* input_prev_outpoint : TWO^32 |- S (TWO^256 * TWO^32) */
221bool simplicity_input_prev_outpoint(frameItem* dst, frameItem src, const txEnv* env) {

Callers

nothing calls this directly

Calls 3

writeBitFunction · 0.85
skipBitsFunction · 0.85
writeHashFunction · 0.70

Tested by

no test coverage detected