chain: minor.
This commit is contained in:
parent
eabbfbf98b
commit
a6c1e8c339
@ -87,7 +87,7 @@ function Chain(options) {
|
|||||||
this.height = -1;
|
this.height = -1;
|
||||||
this.synced = false;
|
this.synced = false;
|
||||||
this.state = new DeploymentState();
|
this.state = new DeploymentState();
|
||||||
this._time = util.hrtime();
|
this.startTime = util.hrtime();
|
||||||
|
|
||||||
this.orphanMap = {};
|
this.orphanMap = {};
|
||||||
this.orphanPrev = {};
|
this.orphanPrev = {};
|
||||||
@ -264,8 +264,7 @@ Chain.prototype.isGenesis = function isGenesis(block) {
|
|||||||
* @private
|
* @private
|
||||||
* @param {Block|MerkleBlock} block
|
* @param {Block|MerkleBlock} block
|
||||||
* @param {ChainEntry} entry
|
* @param {ChainEntry} entry
|
||||||
* @returns {Promise}
|
* @returns {Promise} - Returns [{@link VerifyError}, {@link VerifyFlags}].
|
||||||
* [{@link VerifyError}, {@link VerifyFlags}].
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Chain.prototype.verify = co(function* verify(block, prev) {
|
Chain.prototype.verify = co(function* verify(block, prev) {
|
||||||
@ -429,8 +428,7 @@ Chain.prototype.verify = co(function* verify(block, prev) {
|
|||||||
* Check all deployments on a chain, ranging from p2sh to segwit.
|
* Check all deployments on a chain, ranging from p2sh to segwit.
|
||||||
* @param {Block} block
|
* @param {Block} block
|
||||||
* @param {ChainEntry} prev
|
* @param {ChainEntry} prev
|
||||||
* @returns {Promise}
|
* @returns {Promise} - Returns [{@link VerifyError}, {@link DeploymentState}].
|
||||||
* [{@link VerifyError}, {@link DeploymentState}].
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Chain.prototype.getDeployments = co(function* getDeployments(block, prev) {
|
Chain.prototype.getDeployments = co(function* getDeployments(block, prev) {
|
||||||
@ -1329,7 +1327,7 @@ Chain.prototype.isSlow = function isSlow() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
Chain.prototype.mark = function mark() {
|
Chain.prototype.mark = function mark() {
|
||||||
this._time = util.hrtime();
|
this.startTime = util.hrtime();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1353,7 +1351,7 @@ Chain.prototype.finish = function finish(block, entry) {
|
|||||||
util.gc();
|
util.gc();
|
||||||
this.logger.memory();
|
this.logger.memory();
|
||||||
|
|
||||||
elapsed = util.hrtime(this._time);
|
elapsed = util.hrtime(this.startTime);
|
||||||
time = elapsed[0] * 1000 + elapsed[1] / 1e6;
|
time = elapsed[0] * 1000 + elapsed[1] / 1e6;
|
||||||
|
|
||||||
this.logger.info(
|
this.logger.info(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user