Research Article

MPoR: A Modified Consensus for Blockchain-Based Internet of Vehicles

Algorithm 2

Reputation optimization.
Input: List , Weight factor
Output: List of vehicles after reputation optimization
  
1: fordo
2: Calculate From equation (5), (9), (10), (11)
3: Calculate normalized reputation from Equation (4)
4: Add into List
5: 
6: end for
7: Sort in descending order
8: Calculate target reputation
9: fordo
10: ifthen
11:  break
12: else
13:  
14:  Add into
15: end if
16: end for
17: Broadcast to all nodes
18: return List