Deitos-Network / deitos-node

GNU General Public License v3.0
1 stars 1 forks source link

Feedback submission #11

Closed kalaninja closed 8 months ago

kalaninja commented 8 months ago

This PR

  1. introduces a "service deposit". This is

    • held from Consumer when the agreement is requested
    • released when Consumer revokes agreement
    • released when Consumer submits a feedback
    • transferred to IP if agreement is terminated due to non-payment

    The amount of service deposit is defined in the pallet config.

  2. adds new transaction consumer_submit_feedback submits a feedback in the form of score and comment. Score is an item from a set of {0, 1, 2, 3, 4}. Comment is a string. When submitted the score is saved into an IP rating.

  3. adds IP rating that is kept in IP details. The rating is saved as a pair of numbers cumulative_score (a sum of all the scores given) and number_of_ratings (counter of the scores)