Skip to main content
. 2022 Sep 8;22(18):6806. doi: 10.3390/s22186806
Algorithm 3: Verify Node Before Joining it Into Network
//This code checks if a node has a card identity
//It is a Boolean returning value that returns true if the node has a card or returns false when the node does not have a card
Begin
if ((ecrecover(hash, v, _r, _s) == masterAddr) || (ecrecover(hash, v + 1, _r, _s) ==masterAddr))
   then
    Return true;
   else
   Return false.
   End;