Copied TCP impl from other project, basic Block implementation, randomx pow, signing via secp256k1

This commit is contained in:
2026-03-29 17:18:23 +02:00
commit 57bfe61c13
26 changed files with 1775 additions and 0 deletions

20
include/block/chain.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef CHAIN_H
#define CHAIN_H
#include <block/block.h>
#include <dynarr.h>
#include <stdlib.h>
typedef struct {
DynArr* blocks;
size_t size;
} blockchain_t;
blockchain_t* Chain_Create();
void Chain_Destroy(blockchain_t* chain);
bool Chain_AddBlock(blockchain_t* chain, block_t* block);
block_t* Chain_GetBlock(blockchain_t* chain, size_t index);
size_t Chain_Size(blockchain_t* chain);
bool Chain_IsValid(blockchain_t* chain);
#endif