Skip to main content
. 2022 Oct 15;22(20):7842. doi: 10.3390/s22207842
Algorithm 2: Smart contract for public supervision information on-chain
Input:EnterPeer, PubSupInfo
Output:txID, BlockNum
1 // Check the format and content of data trading information
2 if ((isTdTypeLegal(PubSupInfo) && isTdContentLegal(PubSupInfo))
3 // Store the data transaction information in the blockchain public area
4 if (wriPubChannel(EnterPeer, PubSupInfo))
5  return txID, BlockNum;