Research Article

On the Exploitation of Blockchain for Distributed File Storage

Algorithm 1

Process for public auction.
1:Declare Member(Seller/ M parties /)
2:Declare Timeouts(/ timeouts /)
3:Declare Function contract auction(In &input, Out &output)
4:Set win = −1
5:Set btprice = −1
6:Set secdprice = −1 7:loop
8: for each j < m do
9:  if input.pat[j].value > btprice then
10:  Let secdprice = btprice
11:  Let btprice = input.pat[j]
12:  Let winner = j
13: else if input.pat[j].value > secdprice then
14:  Let secdprice = input.pat[j].value
15://The winner pays the bidder
16://The others are refused
17:Let output.seller.value = secdprice
18:Let output.pat[win].value = btprice − secdprice
19:Let output.win = win
20:for each j < m do
21: if j ≠ win then
22:  output.pat[j].value = input.pat[j].value