Dear All, I have two smart contracts A and B in a single chaincode installed on BCN . The smart contracts operates on different assets. I have a method/ function in chaincode which internally calls method from other smart contract say B . when I call the chaincode method , all transactions ( from smart contract A and B ) are executed with same single transaction Id ,
write set for transaction shows separate write set for every action but with same transaction id.
Now how to get transaction log for transactions for each smart contract separately? Can I assign / reset new transaction id before calling method from another smart contract ? so a new TXID will get assigned while executing another smartcontract method ?
No, that is not possible. The entire point of calling a function from one contract to another is to ensure they are committed atomically in a single transaction.
If you want two different transactions, you would have to do two separate invocations.
From:
fabric@... <fabric@...> on behalf of Avinash Vijaykumar Pedgaonkar <avinash.vp@...> Date: Friday, July 22, 2022 at 8:05 AM To: fabric@... <fabric@...> Subject: [EXTERNAL] [Hyperledger Fabric] how to get separate transaction id for two transactions within same chaincode
Dear All, I have two smart contracts A and B in a single chaincode installed on BCN . The smart contracts operates on different assets. I have a method/ function
in chaincode which internally calls method from other smart contract say B .
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Dear All,
I have two smart contracts A and B in a single chaincode installed on BCN . The smart contracts operates on different assets.
I have a method/ function in chaincode which internally calls method from other smart contract say B .
when I call the chaincode method , all transactions ( from smart contract A and B ) are executed with same single transaction Id ,
write set for transaction shows separate write set for every action but with same transaction id.
Now how to get transaction log for transactions for each smart contract separately?
Can I assign / reset new transaction id before calling method from another smart contract ? so a new TXID will get assigned while executing another smartcontract method ?