Skip to main content
. 2024 Nov 20;24(22):7384. doi: 10.3390/s24227384
Algorithm 2. Product Registration Process
1: function REGISTRATIONPROCESS(Nnv)
2:  Input: Nnv = T1,T2,T3...  ▷ a set of transactions
3: Output: S Boolean  ▷ State of registration processing of the node.
4:         for each transaction i in Nnv do
5:         Pi = getProductIdFromTransaction(Ti)
6:         Sp = checkExistingProductInBlockChain(Pi)
7:         if Sp is false then
8:               Ni = createNodeForProduct(Pi)
9:                 ExecutePoAhProcessing(Ni)
10:             S    true
11:         else if Nt.veri f y(i) is true then
12:                      S    false
13:              end if
14:          end for
15: Return S
16: end function