Research Article

[Retracted] Design and Application of Electronic Rehabilitation Medical Record (ERMR) Sharing Scheme Based on Blockchain Technology

Algorithm 1

Algorithm on leader election
Input: The REQUEST to elect R1 as leader.
Output:Si.
1: ifthen
2:  for to Ndo
3:   R1 send Ri a REQUEST to elect R1 as leader
4:  end for
5:  
6:  for to Ndo
7:   ifRi agree to elect R1 as leader then
8:    Ri vote yes
9:    
10:   end if
11:   ifthen
12:    R1 is elected as leader
13:    
14:    for to Ndo
15:     
16:    end for
17:    break
18:   end if
19:  end for
20: end if