In the current global pinning implementation, a user can set both the GlobalPinner and EnablePinning flags separate and independently.
This won't cause the code to break, but it doesn't really make sense to set the GlobalPinner flag if EnablePinning is unset. This is because only locally pinned files should be able to be re-uploaded for repair.
Eventually, when the recovery mechanism is triggered, a global pinner will just fail to re-upload a file if its not pinned. This is part of the logic in the setReUpload function of the localstore package.
If the flags are checked against each other, we can avoid triggering some of these useless recovery processes.
Note, however, that we cannot avoid all of them: a node can have both flags set and still receive recovery requests for a file it does no longer pin, or never pinned in the first place.
In the current global pinning implementation, a user can set both the
GlobalPinner
andEnablePinning
flags separate and independently.This won't cause the code to break, but it doesn't really make sense to set the
GlobalPinner
flag ifEnablePinning
is unset. This is because only locally pinned files should be able to be re-uploaded for repair.Eventually, when the recovery mechanism is triggered, a global pinner will just fail to re-upload a file if its not pinned. This is part of the logic in the
setReUpload
function of thelocalstore
package.If the flags are checked against each other, we can avoid triggering some of these useless recovery processes.
Note, however, that we cannot avoid all of them: a node can have both flags set and still receive recovery requests for a file it does no longer pin, or never pinned in the first place.