Algorithm 2: Copyright Registration function of the content |
Input: OwnerAddr, Name, IPFSpc, Token, Proof Output: ReviewResultc, VoteResultc, RegistrationResultc |
1 function CopyrightRes(OwnerAddr, Name, IPFSpc, Token, Proof) 2 Check the Proof to ensure the proof record of the content has been 3 finished 4 if the Proof is incorrect then 5 return null, false 6 end if 7 Continue with the Review Process and Voting Process, assign the Token to RewardR, Rewardv, and service fee 8 Let RewardR ← Token for review 9 Let RewardV ← Token for vote 10 Let Service fee ← Token for service fee 11 Call RequestReview SC for review, awaiting review by reviewers on the copyright review blockchain. 12 Call the Voting SC’s Vote function to request voters to vote on the current blockchain 13 After receiving the ReviewResultc and VoteResultc, aggregate them to generate the final RegistrationResultc 14 if ReviewResultc ≠ VoteResultc 15 return null, false 16 end 17 else 18 Let RegistrationResultc ← aggregate(ReviewResultc, VoteResultc) 19 end if 20 return RegistrationResultc, true 21 end function |