Superalgos Network, first modules

This commit is contained in:
Luis Fernando Molina committed 2021-08-24 20:37:04 +02:00
1 parent d96d91049d
commit 383b9f1368
6 files changed
+227 -70

No files matched your search

+16 -4
View File
@@ -1,7 +1,19 @@
let usersProfiles = new Map() // Here we will store the user profiles and their statistics.
let timeline = [] // A time ordered list of Posts and Trades.
let events = new Map()
let hashGraph = {}
global.NT = {
memory: {
USER_PROFILES: new Map(), // Here we will store the user profiles and their statistics.
POSTS: new Map(), // This are all the posts we are keeping track of.
EVENTS: new Map(), // This is the registry of all events received that prevents processing them more than once.
TIMELINE: [] // A time ordered list of Posts and Trades.
},
modules: {
EVENT: require('./event.js'),
POST: require('./post.js')
}
}
/*
We will add this event to the timeline
*/
NT.memory.TIMELINE.push()