1
0
forked from circlecloud/tera

style: comment unused code and format

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2019-07-10 17:53:52 +08:00
parent 812813da8d
commit f0d4952b27
32 changed files with 3958 additions and 5739 deletions

View File

@@ -10,7 +10,7 @@
"use strict";
import net = require("net");
import dgram = require("dgram");
// import dgram = require("dgram");
import * as crypto from 'crypto';
import "./library"
import "./crypto-library"
@@ -19,7 +19,7 @@ global.BUF_TYPE = 1;
global.STR_TYPE = 2;
global.MAX_STR_BUF_DATA = 200;
global.MAX_CONNECTION_ACTIVE = 40;
var MAX_CONNECTION_ANOTHER = 40;
// var MAX_CONNECTION_ANOTHER = 40;
const TRAFIC_LIMIT_NODE_1S = global.MAX_BLOCK_SIZE * 1.25;
const TRAFIC_LIMIT_1S = 8 * TRAFIC_LIMIT_NODE_1S;
global.STAT_PERIOD = global.CONSENSUS_PERIOD_TIME / 5;
@@ -715,13 +715,13 @@ export default class CTransport extends require("./connect")
}
DoSendBuf() {
this.RecalcSendStatictic()
var CountNodeSend = 0;
// var CountNodeSend = 0;
var it = this.ActualNodes.iterator(), Node;
NEXT_NODE:
while ((Node = it.next()) !== null)
if (Node.Socket && Node.ConnectStatus() === 100)
if (Node.BufWrite.length > 0) {
CountNodeSend++
// CountNodeSend++
var CountSend = Math.min(BUF_PACKET_SIZE, Node.BufWrite.length);
var Value = CountSend / 1024;
if (global.LIMIT_SEND_TRAFIC) {