Socket
Socket
Sign inDemoInstall

@hyperledger/caliper-core

Package Overview
Dependencies
20
Maintainers
4
Versions
262
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0-unstable-20200227121044 to 0.3.0-unstable-20200228110951

11

lib/worker/rate-control/compositeRate.js

@@ -85,3 +85,4 @@ /*

this.activeControllerIndex = 0;
this.clientIdx = -1;
this.clientIdx = clientIdx + 1;
this.roundIndex = roundIdx;
this.controllerSwitch = null;

@@ -91,3 +92,3 @@ this.logControllerChange = (this.options.logChange &&

this.__prepareControllers(clientIdx, roundIdx);
this.__prepareControllers();
}

@@ -97,7 +98,5 @@

* Internal method for preparing the controllers for further use.
* @param {number} clientIdx The 0-based index of the client who instantiates the controller.
* @param {number} roundIdx The 1-based index of the round the controller is instantiated in.
* @private
*/
__prepareControllers(clientIdx, roundIdx) {
__prepareControllers() {
let weights = this.options.weights;

@@ -142,3 +141,3 @@ let rateControllers = this.options.rateControllers;

let info = new ControllerData(weights[i], rateControllers[i], new RateControl(rateControllers[i], clientIdx, roundIdx));
let info = new ControllerData(weights[i], rateControllers[i], new RateControl(rateControllers[i], this.clientIdx, this.roundIndex));
this.controllers.push(info);

@@ -145,0 +144,0 @@ }

@@ -50,2 +50,4 @@ /*

super(opts);
this.roundIdx = roundIdx;
this.clientIdx = clientIdx + 1;
this.records = [];

@@ -141,5 +143,2 @@

async init(msg) {
this.roundIdx = msg.roundIdx;
this.clientIdx = msg.clientIdx + 1;
// if we know the number of transactions beforehand, pre-allocate the array

@@ -146,0 +145,0 @@ if (msg.numb) {

@@ -45,5 +45,9 @@ /*

* @param {object} opts Options for the rate controller.
* @param {number} clientIdx The 0-based index of the client who instantiates the controller.
* @param {number} roundIdx The 1-based index of the round the controller is instantiated in.
*/
constructor(opts) {
constructor(opts, clientIdx, roundIdx) {
super(opts);
this.roundIdx = roundIdx;
this.clientIdx = clientIdx + 1;
this.records = [];

@@ -127,5 +131,2 @@

async init(msg) {
this.roundIdx = msg.roundIdx;
this.clientIdx = msg.clientIdx + 1;
// resolve template path placeholders

@@ -132,0 +133,0 @@ this.pathTemplate = this.pathTemplate.replace(/<R>/gi, this.roundIdx.toString());

{
"name": "@hyperledger/caliper-core",
"description": "Core Hyperledger Caliper module, used for running performance benchmarks that interact with blockchain technologies",
"version": "0.3.0-unstable-20200227121044",
"version": "0.3.0-unstable-20200228110951",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc