 Hyperledger Fabric 2.5 中文文档handling (usage documentation) 故障处理 但如果我们想更加灵活,给用户另一个选择,该怎么办?一个名为 warn_only 的设置(或着说 环境变量 ,通常缩写为 env var )可以把退出换为警告,以 提供更灵活的错误处理。 让我们把这个设置丢到 test 函数中,然后注意这个 local 调用的结果: from __future__ import with_statement imported: from fabric.api import env, run env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') Such a fabfile, run simply as fab mytask, will run mytask on host1 followed by host2. Since api import env, run def set_hosts(): env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') When run as fab set_hosts mytask, set_hosts is a “local” task – its own host list is empty –0 码力 | 138 页 | 154.00 KB | 1 年前3 Hyperledger Fabric 2.5 中文文档handling (usage documentation) 故障处理 但如果我们想更加灵活,给用户另一个选择,该怎么办?一个名为 warn_only 的设置(或着说 环境变量 ,通常缩写为 env var )可以把退出换为警告,以 提供更灵活的错误处理。 让我们把这个设置丢到 test 函数中,然后注意这个 local 调用的结果: from __future__ import with_statement imported: from fabric.api import env, run env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') Such a fabfile, run simply as fab mytask, will run mytask on host1 followed by host2. Since api import env, run def set_hosts(): env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') When run as fab set_hosts mytask, set_hosts is a “local” task – its own host list is empty –0 码力 | 138 页 | 154.00 KB | 1 年前3
 Hyperledger Fabric 1.4 中文文档handling (usage documentation) 故障处理 但如果我们想更加灵活,给用户另一个选择,该怎么办?一个名为 warn_only 的设置(或着说 环境变量 ,通常缩写为 env var )可以把退出换为警告,以 提供更灵活的错误处理。 让我们把这个设置丢到 test 函数中,然后注意这个 local 调用的结果: from __future__ import with_statement imported: from fabric.api import env, run env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') Such a fabfile, run simply as fab mytask, will run mytask on host1 followed by host2. Since api import env, run def set_hosts(): env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') When run as fab set_hosts mytask, set_hosts is a “local” task – its own host list is empty –0 码力 | 145 页 | 161.53 KB | 1 年前3 Hyperledger Fabric 1.4 中文文档handling (usage documentation) 故障处理 但如果我们想更加灵活,给用户另一个选择,该怎么办?一个名为 warn_only 的设置(或着说 环境变量 ,通常缩写为 env var )可以把退出换为警告,以 提供更灵活的错误处理。 让我们把这个设置丢到 test 函数中,然后注意这个 local 调用的结果: from __future__ import with_statement imported: from fabric.api import env, run env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') Such a fabfile, run simply as fab mytask, will run mytask on host1 followed by host2. Since api import env, run def set_hosts(): env.hosts = ['host1', 'host2'] def mytask(): run('ls /var/www') When run as fab set_hosts mytask, set_hosts is a “local” task – its own host list is empty –0 码力 | 145 页 | 161.53 KB | 1 年前3
 FISCO BCOS 1.3 中文文档web3调用示例如下(可参看systemcontract/tool.js): var instance=getAction("NodeAction"); var func = "registerNode(string,string,string,string)"; var params = [node.id,node.name,node.agency,node.caHash]; var receipt = web3sync.sen web3调用示例如下(可参看systemcontract/tool.js): var instance=getAction("CAAction"); var func = "add(string,string,string)"; var params = [ca.serial,ca.pubkey,ca.name]; var receipt = web3sync.sendRawTransaction(config 接口、交易数据 无 无 web3调用示例如下(可参看systemcontract/deploy.js): var GroupReicpt= await web3sync.rawDeploy(config.account, config.privKey, "Group"); var Group=web3.eth.contract(getAbi("Group")).at(GroupReicpt0 码力 | 491 页 | 5.72 MB | 1 年前3 FISCO BCOS 1.3 中文文档web3调用示例如下(可参看systemcontract/tool.js): var instance=getAction("NodeAction"); var func = "registerNode(string,string,string,string)"; var params = [node.id,node.name,node.agency,node.caHash]; var receipt = web3sync.sen web3调用示例如下(可参看systemcontract/tool.js): var instance=getAction("CAAction"); var func = "add(string,string,string)"; var params = [ca.serial,ca.pubkey,ca.name]; var receipt = web3sync.sendRawTransaction(config 接口、交易数据 无 无 web3调用示例如下(可参看systemcontract/deploy.js): var GroupReicpt= await web3sync.rawDeploy(config.account, config.privKey, "Group"); var Group=web3.eth.contract(getAbi("Group")).at(GroupReicpt0 码力 | 491 页 | 5.72 MB | 1 年前3
 Hyperledger Fabric 1.2 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 335 页 | 4.48 MB | 1 年前3 Hyperledger Fabric 1.2 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 335 页 | 4.48 MB | 1 年前3
 Hyperledger Fabric 1.1 Documentationtty: true stdin_open: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG #- CORE_LOGGING_LEVEL=INFO Crypto Generator We will volumes: - /var/hyperledger/peer0:/var/hyperledger/production For the CouchDB container, you may add the following two lines in the CouchDB container specification: volumes: - /var/hyperledger/co endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exits) You likely have chaincode images (e.g. dev-peer10 码力 | 422 页 | 4.84 MB | 1 年前3 Hyperledger Fabric 1.1 Documentationtty: true stdin_open: true environment: - GOPATH=/opt/gopath - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG #- CORE_LOGGING_LEVEL=INFO Crypto Generator We will volumes: - /var/hyperledger/peer0:/var/hyperledger/production For the CouchDB container, you may add the following two lines in the CouchDB container specification: volumes: - /var/hyperledger/co endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exits) You likely have chaincode images (e.g. dev-peer10 码力 | 422 页 | 4.84 MB | 1 年前3
 Hyperledger Fabric 1.1 Documentationcs Documentation, Release master (continued from previous page) - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG #- CORE_LOGGING_LEVEL=INFO 3.1.3 Crypto Generator We will volumes: - /var/hyperledger/peer0:/var/hyperledger/production For the CouchDB container, you may add the following two lines in the CouchDB container specification: volumes: - /var/hyperledger/co endorsing chaincode: rpc error: code = 2 desc = Error installing ˓→chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1. ˓→0 exits) You likely have chaincode images (e.g. dev-peer10 码力 | 277 页 | 3.21 MB | 1 年前3 Hyperledger Fabric 1.1 Documentationcs Documentation, Release master (continued from previous page) - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock - CORE_LOGGING_LEVEL=DEBUG #- CORE_LOGGING_LEVEL=INFO 3.1.3 Crypto Generator We will volumes: - /var/hyperledger/peer0:/var/hyperledger/production For the CouchDB container, you may add the following two lines in the CouchDB container specification: volumes: - /var/hyperledger/co endorsing chaincode: rpc error: code = 2 desc = Error installing ˓→chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1. ˓→0 exits) You likely have chaincode images (e.g. dev-peer10 码力 | 277 页 | 3.21 MB | 1 年前3
 Hyperledger Fabric 1.2 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 497 页 | 6.59 MB | 1 年前3 Hyperledger Fabric 1.2 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 497 页 | 6.59 MB | 1 年前3
 Hyperledger Fabric 1.3 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 528 页 | 6.85 MB | 1 年前3 Hyperledger Fabric 1.3 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 528 页 | 6.85 MB | 1 年前3
 Hyperledger Fabric 1.3 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 367 页 | 4.95 MB | 1 年前3 Hyperledger Fabric 1.3 Documentationspecified by the app dev. var channel = fabric_client.newChannel('mychannel'); var peer = fabric_client.newPeer('grpc://localhost:7051'); channel.addPeer(peer); var member_user = null; var store_path = path.join(__dirname join(__dirname, 'hfc-key-store'); console.log('Store path:'+store_path); var tx_id = null; This is the chunk where we construct our query: // queryCar chaincode function - requires 1 argument, ex: args: function - requires 2 args , ex: args: ['CAR10', 'Barry'], // must send the proposal to endorsing peers var request = { //targets: let default to the peer assigned to the client chaincodeId: 'fabcar', fcn:0 码力 | 367 页 | 4.95 MB | 1 年前3
 Hyperledger Fabric 2.1 Documentation61967ad- 42f57faac8360472e47cbbbf3940e81bba83439702d085878d148089a1b213ca/ json": dial unix /host/var/run/docker.sock: connect: no such file or directory Chaincode installation on peer0.org1 has failed endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exits) You likely have chaincode images (e.g. dev-peer1 *SimpleChaincode) readMarble(stub shim.ChaincodeStubInterface, args []string) pb.Response { var name, jsonResp string var err error if len(args) != 1 { return shim.Error("Incorrect number of0 码力 | 904 页 | 10.95 MB | 1 年前3 Hyperledger Fabric 2.1 Documentation61967ad- 42f57faac8360472e47cbbbf3940e81bba83439702d085878d148089a1b213ca/ json": dial unix /host/var/run/docker.sock: connect: no such file or directory Chaincode installation on peer0.org1 has failed endorsing chaincode: rpc error: code = 2 desc = Error installing chaincode code mycc:1.0(chaincode /var/hyperledger/production/chaincodes/mycc.1.0 exits) You likely have chaincode images (e.g. dev-peer1 *SimpleChaincode) readMarble(stub shim.ChaincodeStubInterface, args []string) pb.Response { var name, jsonResp string var err error if len(args) != 1 { return shim.Error("Incorrect number of0 码力 | 904 页 | 10.95 MB | 1 年前3
共 70 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7














