reorg code, integration publish/subscribe working, still some TODOs
This commit is contained in:
parent
043a95d9ef
commit
1af6d56e2d
35 changed files with 3052 additions and 1401 deletions
46
constants.js
Normal file
46
constants.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
const DIFFICULTY = 3;
|
||||
const MINE_RATE = 3000;
|
||||
const MINING_REWARD = 50;
|
||||
|
||||
const DEFAULT_PORT_MINER_BASE = 3000;
|
||||
const DEFAULT_PORT_MINER_API = DEFAULT_PORT_MINER_BASE + 1;
|
||||
const DEFAULT_PORT_MINER_CHAIN = DEFAULT_PORT_MINER_BASE + 2;
|
||||
const DEFAULT_PORT_MINER_TX_SHARE = DEFAULT_PORT_MINER_BASE + 3;
|
||||
const DEFAULT_PORT_MINER_TX_RECV = DEFAULT_PORT_MINER_BASE + 4;
|
||||
|
||||
|
||||
const DEFAULT_PORT_WALLET_BASE = 4000;
|
||||
const DEFAULT_PORT_WALLET_API = DEFAULT_PORT_WALLET_BASE + 1;
|
||||
const DEFAULT_PORT_WALLET_CHAIN = DEFAULT_PORT_WALLET_BASE + 2;
|
||||
|
||||
const DEFAULT_PORT_BROKER_BASE = 5000;
|
||||
const DEFAULT_PORT_BROKER_API = DEFAULT_PORT_BROKER_BASE + 1;
|
||||
const DEFAULT_PORT_BROKER_CHAIN = DEFAULT_PORT_BROKER_BASE + 2;
|
||||
const DEFAULT_PORT_BROKER_SENSOR_HANDSHAKE = DEFAULT_PORT_BROKER_BASE + 3;
|
||||
const DEFAULT_PORT_BROKER_SENSOR_MQTT = DEFAULT_PORT_BROKER_BASE + 4;
|
||||
const DEFAULT_PORT_BROKER_CLIENT_MQTT = DEFAULT_PORT_BROKER_BASE + 5;
|
||||
|
||||
const DEFAULT_PORT_SENSOR_BASE = 6000;
|
||||
const DEFAULT_PORT_SENSOR_API = DEFAULT_PORT_SENSOR_BASE + 1;
|
||||
|
||||
module.exports = {
|
||||
DIFFICULTY,
|
||||
MINE_RATE,
|
||||
MINING_REWARD,
|
||||
|
||||
DEFAULT_PORT_MINER_API,
|
||||
DEFAULT_PORT_MINER_CHAIN,
|
||||
DEFAULT_PORT_MINER_TX_SHARE,
|
||||
DEFAULT_PORT_MINER_TX_RECV,
|
||||
|
||||
DEFAULT_PORT_WALLET_API,
|
||||
DEFAULT_PORT_WALLET_CHAIN,
|
||||
|
||||
DEFAULT_PORT_BROKER_API,
|
||||
DEFAULT_PORT_BROKER_CHAIN,
|
||||
DEFAULT_PORT_BROKER_SENSOR_HANDSHAKE,
|
||||
DEFAULT_PORT_BROKER_SENSOR_MQTT,
|
||||
DEFAULT_PORT_BROKER_CLIENT_MQTT,
|
||||
|
||||
DEFAULT_PORT_SENSOR_API
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue