gloebit / opensim-moneymodule-gloebit

OpenSim addon module integrating with the Gloebit digital currency service
GNU Lesser General Public License v3.0
8 stars 10 forks source link

stop unnecessary balance updates from UploadCovered() and ChargeCovered() when price is 0 #80

Closed colosi closed 5 years ago

colosi commented 5 years ago

These 2 functions currently assume they are not called with a price of 0. This is incorrect and we are making many unnecessary API calls on sims where the upload price is 0.

colosi commented 5 years ago

I've reviewed the 3 OpenSim paths I'm aware of which call UploadCovered() to verify that just returning true for a price of zero won't affect anything. It looks good. Also, two of these 3 paths will call UploadCovered with a price of 0.

colosi commented 5 years ago

I've reviewed the 2 OpenSim paths I'm aware of which call AmountCovered() to verify that just returning true for a price of zero won't affect anything. It looks good. One of those paths would also call with a price of 0.

colosi commented 5 years ago

Before forcing an update balance, we'll check if the price is <= to zero. If it is, we'll just short circuit and return true.