Research Article
HLOChain: A Hierarchical Blockchain Framework with Lightweight Consensus and Optimized Storage for IoT
Algorithm 2
Historical block offloading.
| Input: : A blockchain composed of t blocks where the blocks are sorted in chronological order, and is the latest block. | | Output: : A shorter blockchain | (1) | procedure | (2) | get list_of_newAcct from | (3) | get the min from list_of_newAcct | (4) | the min | (5) | for alldo | (6) | if | (7) | delete | (8) | end if | (9) | for alldo | (10) | delete | (11) | return | (12) | end procedure |
|