channel.queryInfo() #670
-
Excuse me,I hava a problem:
the error is “TypeError: channel.queryInfo is not a function” In the new SDK, has the method of obtaining the hash value of the latest block been deprecated? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The low-level API from the fabric-client package was completely re-worked for the v2.2 release. The low-level implementation underpinning the fabric-network API is now contained in the fabric-common package, and its Channel implementation does not include a queryInfo() method: https://hyperledger.github.io/fabric-sdk-node/main/Channel.html As an alternative, it is possible to use the fabric-network API to evaluate the If you are just moving up from Fabric v1.4 now, you really should look at migrating to Fabric v2.5 LTS and the newer Fabric Gateway client API. Here the approach would be the same - to evaluate the |
Beta Was this translation helpful? Give feedback.
The low-level API from the fabric-client package was completely re-worked for the v2.2 release. The low-level implementation underpinning the fabric-network API is now contained in the fabric-common package, and its Channel implementation does not include a queryInfo() method:
https://hyperledger.github.io/fabric-sdk-node/main/Channel.html
As an alternative, it is possible to use the fabric-network API to evaluate the
GetChainInfo
transaction function on theqscc
system chaincode. This returns a serialized BlockchainInfo protocol buffer message, which contains the same information as the olf queryInfo() method. You can deserialize this message using the Fabric protocol buffer bindings pub…