Research Article
MB-BC: Drug Traceability System Based on Multibranched Blockchain Structure
Algorithm 2
Witness node election method.
| Input: S(set of nodes), (number of leading nodes), (number of general nodes), (number of witness nodes) | | Output:(set of witness nodes), (set of alternate nodes) | | 1: initialize: Set | | 2: for to do | | 3: for to do | | 4: ; | | 5: end for | | 6: return | | 7: ; | | 8: ; | | 9: end for | | 10: return | | 11: ; | | 12: ; | | 13: ; | | 14: return R1,R2 |
|