Research Article
A Research on Traceability Technology of Agricultural Products Supply Chain Based on Blockchain and IPFS
Algorithm 4
Consumer evaluation algorithm.
| Input: IDseller, mR,, PKsell,, Info | | Output: Evaluation agency verification results | | (1) | The seller applies evaluation contract function: comment (, , PKsell) | | (2) | ifthen | | (3) | Apply signature function: signature () | | (4) | If block verification passed then | | (5) | Trigger contract storage function: storage (Info, HInfo) | | (6) | Trigger contract credit update function: credit (IDseller, Valuetrust) | | (7) | else | | (8) | return (“verification failed”) | | (9) | end if | | (10) | else | | (11) | return (“No review permission”) | | (12) | end if |
|