Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fabric-shim

Package Overview
Dependencies
Maintainers
2
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fabric-shim - npm Package Compare versions

Comparing version 1.3.0-snapshot.17 to 1.3.0-snapshot.18

5

lib/chaincode.js

@@ -27,2 +27,7 @@ /*

{name: 'grpc.max_receive_message_length', type: Number, defaultValue: -1},
{name: 'grpc.keepalive_time_ms', type: Number, defaultValue: 60000},
{name: 'grpc.http2.min_time_between_pings_ms', type: Number, defaultValue: 60000},
{name: 'grpc.keepalive_timeout_ms', type: Number, defaultValue: 20000},
{name: 'grpc.http2.max_pings_without_data', type: Number, defaultValue: 0},
{name: 'grpc.keepalive_permit_without_calls', type: Number, defaultValue: 1},
{name: 'ssl-target-name-override', type: String}

@@ -29,0 +34,0 @@ ];

2

package.json
{
"name": "fabric-shim",
"version": "1.3.0-snapshot.17",
"version": "1.3.0-snapshot.18",
"description": "A node.js implementation of Hyperledger Fabric chaincode shim, to allow endorsing peers and user-provided chaincodes to communicate with each other",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -54,3 +54,3 @@ /*

it ('shout set value when peer.address argument set', () => {
it ('should set value when peer.address argument set, and default others', () => {
process.argv.push('--peer.address');

@@ -63,2 +63,12 @@ process.argv.push('localhost:7051');

expect(opts['peer.address']).to.deep.equal('localhost:7051');
expect(opts['grpc.max_send_message_length']).to.equal(-1);
expect(opts['grpc.max_receive_message_length']).to.equal(-1);
expect(opts['grpc.keepalive_time_ms']).to.equal(60000);
expect(opts['grpc.http2.min_time_between_pings_ms']).to.equal(60000);
expect(opts['grpc.keepalive_timeout_ms']).to.equal(20000);
expect(opts['grpc.keepalive_permit_without_calls']).to.equal(1);
expect(opts['grpc.http2.max_pings_without_data']).to.equal(0);
process.argv.pop();
process.argv.pop();
});

@@ -78,3 +88,43 @@

expect(opts['test.again']).to.be.an('undefined');
for (let index = 0; index < 4; index++) {
process.argv.pop();
}
});
it ('should be possible to change the default CLI values', () => {
process.argv.push('--peer.address');
process.argv.push('localhost:7051');
process.argv.push('--grpc.max_send_message_length');
process.argv.push('101');
process.argv.push('--grpc.max_receive_message_length');
process.argv.push('177');
process.argv.push('--grpc.keepalive_time_ms');
process.argv.push('1234');
process.argv.push('--grpc.keepalive_timeout_ms');
process.argv.push('5678');
process.argv.push('--grpc.http2.min_time_between_pings_ms');
process.argv.push('7654');
process.argv.push('--grpc.http2.max_pings_without_data');
process.argv.push('99');
process.argv.push('--grpc.keepalive_permit_without_calls');
process.argv.push('2');
delete require.cache[require.resolve(chaincodePath)];
let Chaincode = rewire(chaincodePath);
let opts = Chaincode.__get__('opts');
expect(opts['peer.address']).to.deep.equal('localhost:7051');
expect(opts['grpc.max_send_message_length']).to.equal(101);
expect(opts['grpc.max_receive_message_length']).to.equal(177);
expect(opts['grpc.keepalive_time_ms']).to.equal(1234);
expect(opts['grpc.http2.min_time_between_pings_ms']).to.equal(7654);
expect(opts['grpc.keepalive_timeout_ms']).to.equal(5678);
expect(opts['grpc.keepalive_permit_without_calls']).to.equal(2);
expect(opts['grpc.http2.max_pings_without_data']).to.equal(99);
for (let index = 0; index < 16; index++) {
process.argv.pop();
}
});
});

@@ -81,0 +131,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc