Start doing TCP networking
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user