How can i get the block number by txid? Thank you!

王海明 <wanghaiming0725@...>

Hello! I wanted to get the block number by txid, so i used the function  GetBlockByTxID which is in system chaincode qscc, the terminal commands i used are peer chiancode query and peer chaincode invoke. If i use peer chaincode query to use GetBlockByTxID, the results of the terminal feedback will be all presented in digital form.If i use peer chaincode invoke, part of the results will be presented in digitai form.So how to decode these numbers? Or what other way can i get the block number by txid. Thank you!


On Tue, Nov 29, 2022 at 12:06 PM, 王海明 <wanghaiming0725@...> wrote:
Please refer to this discussion . It explains the logic to retrieve the block & interpret/decode the block to get the block info which includes the block number.