feat(c-miner): port miner pipeline to modular C implementation

This commit is contained in:
2026-03-30 01:07:19 +02:00
parent 9a0a170799
commit d2c118833b
18 changed files with 3299 additions and 0 deletions

23
types.c Normal file
View File

@@ -0,0 +1,23 @@
#include "types.h"
#include <stdlib.h>
void block_template_free(BlockTemplate *tpl) {
size_t i;
if (tpl == NULL) {
return;
}
for (i = 0; i < tpl->tx_count; ++i) {
free(tpl->transactions[i].data);
tpl->transactions[i].data = NULL;
}
free(tpl->transactions);
tpl->transactions = NULL;
tpl->tx_count = 0;
free(tpl->default_witness_commitment);
tpl->default_witness_commitment = NULL;
}