Skip to content

Commit

Permalink
add activityID Assert
Browse files Browse the repository at this point in the history
  • Loading branch information
suerlych committed Nov 5, 2024
1 parent a725801 commit e7c0e1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contract/Forest/ForestContract_Tree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public override Empty ClaimTreePoints(ClaimTreePointsInput input)
CheckPointsRequestHash(requestStr, input.RequestHash);

var lastOpTime = State.TreePointsActivityClaimTimeMap[input.Address][input.ActivityId];
Assert(lastOpTime == 0, "You have already participated in this activity");
Assert(input.OpTime > lastOpTime, "Invalid param OpTime");

var treePointsInfo = State.TreePointsMap[input.Address];
Expand Down

0 comments on commit e7c0e1e

Please sign in to comment.