void btc_tx_in_serialize(cstring* s, const btc_tx_in* tx_in) { ser_u256(s, tx_in->prevout.hash); ser_u32(s, tx_in->prevout.n); ser_varstr(s, tx_in->script_sig); ser_u32(s, tx_in->sequence); }
static cstring *ser_blkinfo(const struct blkinfo *bi) { cstring *rs = cstr_new_sz(sizeof(*bi)); ser_u256(rs, &bi->hash); ser_bp_block(rs, &bi->hdr); return rs; }
cstring *ser_msg_getblocks(const struct msg_getblocks *gb) { cstring *s = cstr_new_sz(256); ser_bp_locator(s, &gb->locator); ser_u256(s, &gb->hash_stop); return s; }
GString *ser_msg_getblocks(const struct msg_getblocks *gb) { GString *s = g_string_sized_new(256); ser_bp_locator(s, &gb->locator); ser_u256(s, &gb->hash_stop); return s; }