p2p Network Node implemented

This commit is contained in:
Luis Fernando Molina committed 2021-11-04 12:03:58 +01:00
1 parent 1bcd24e442
commit 80f7ffaa8e
7 files changed
+95 -4

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
exports.newNetworkModulesP2PNetwork = function newNetworkModulesP2PNetwork() {
/*
This module represents the P2P Network and it is needed to enable the connection
of this current node to other peers.
*/
let thisObject = {
joinTheNetworkAsPeer: joinTheNetworkAsPeer,
/* Framework Functions */
initialize: initialize,
finalize: finalize
}
return thisObject
function finalize() {
}
async function initialize() {
/*
We will setup here the maps and arryas we will need to operate within the P2P Network.
*/
let thisP2PNodeId = SA.secrets.map.get(global.env.P2P_NETWORK_NODE_SIGNING_ACCOUNT).signingAccountNodeId
for (let i = 0; i < SA.projects.network.globals.memory.arrays.P2P_NETWORK_NODES.length; i++) {
let p2pNetworkNode = SA.projects.network.globals.memory.arrays.P2P_NETWORK_NODES[i]
}
}
function joinTheNetworkAsPeer() {
/*
To join the network we will need to thorugh the list of Network Nodes and pick one to connect to.
*/
}
}