Research Article

A Blockchain-Based Microgrid Data Disaster Backup Scheme in Edge Computing

Algorithm 7

Smart contract.
(1)Initialized parameters
(2)Data preprocessing using edge computing
(3)
(4)Store in edge server
(5)Select authorized nodes using Algorithm 3
(6)Verify authorized nodes using Algorithm 4
(7)Calculate the reputation using (10) for each node
(8)Select leader node to generate block according the reputation
(9)
(10)
(11)
(12)Send the to blockchain for storage
(13)Send the to the closest edge server
(14)Integrate the of the into the
(15)
(16)ifthen
(17)
(18)end if
(19)ifthen
(20) Send to the
(21)else
(22)return False
(23)end if
(24)