Research Article

Design and Implementation of Ledger-Based Points Transfer System for IoT Devices in LPWAN

Algorithm 1

Point transfer function
;                  //The number of nodes
;                    //The ledger
     //The candidates of received node ’s update block
Data:, ,
Result:, ,
function transaction_request()
Receive requested transaction from the points transfer terminal;
if is not then
 Send to other nodes;
else
 Receive from other nodes;
end
if is not then
of in ;
of in ;
 Calculate candidates of new balances and based on blocks in ;
and
fortodo
  ifthen
   Receive as calculated candidate of new balances from other nodes;
  end
end
 Calculate as a majority vote of ;
 Send approval results to the points transfer terminal;
;
;
end