Start doing TCP networking

This commit is contained in:
2026-04-15 21:38:30 +02:00
parent 258ca9474f
commit d631eb190d
10 changed files with 190 additions and 54 deletions

View File

@@ -15,6 +15,8 @@
#include <autolykos2/autolykos2.h>
#include <time.h>
#include <nets/net_node.h>
#ifndef CHAIN_DATA_DIR
#define CHAIN_DATA_DIR "chain_data"
#endif
@@ -169,6 +171,12 @@ int main(int argc, char* argv[]) {
uint256_t currentSupply = uint256_from_u64(0);
net_node_t* node = Node_Create();
if (!node) {
BalanceSheet_Destroy();
return 1;
}
blockchain_t* chain = Chain_Create();
if (!chain) {
fprintf(stderr, "failed to create chain\n");
@@ -479,5 +487,8 @@ int main(int argc, char* argv[]) {
Chain_Destroy(chain);
Block_ShutdownPowContext();
Node_Destroy(node);
return 0;
}