static bool spend_block(struct bp_utxo_set *uset, const struct bp_block *block, unsigned int height) { unsigned int i; for (i = 0; i < block->vtx->len; i++) { struct bp_tx *tx; tx = parr_idx(block->vtx, i); if (!spend_tx(uset, tx, i, height)) { char hexstr[BU256_STRSZ]; bu256_hex(hexstr, &tx->sha256); fprintf(plog, "brd: spent_block tx fail %s\n", hexstr); return false; } } return true; }
static bool spend_block(struct bp_utxo_set *uset, const struct bp_block *block, unsigned int height) { unsigned int i; if (height % 10000 == 0) fprintf(stderr, "chain-verf: spend block @ %u\n", height); for (i = 0; i < block->vtx->len; i++) { struct bp_tx *tx; tx = g_ptr_array_index(block->vtx, i); if (!spend_tx(uset, tx, i, height)) { char hexstr[BU256_STRSZ]; bu256_hex(hexstr, &tx->sha256); fprintf(stderr, "chain-verf: tx fail %s\n", hexstr); return false; } } return true; }