See FilOzone/filecoin-services#161
Currently we have this code (in two places):
|
withCDN: dataSet.cdnRailId > 0, // CDN is enabled if cdnRailId is non-zero (should be more reliable than metadata) |
Which turns out to not be true. Termination of a CDN service by FilCDN will:
- Terminate the rails
- Reset the metadata to remove
withCDN (so it's actually a more reliable indicator than the code comment above suggests)
- Set
cdnEndEpoch to be the current epoch (via the railTerminated callback from Payments) instead of 0
The CDN rail IDs are left intact after this operation.
So we either need to bother with fishing around in metadata, or we should check cdnEndEpoch==0 as well.
See FilOzone/filecoin-services#161
Currently we have this code (in two places):
synapse-sdk/src/warm-storage/service.ts
Line 327 in 001e4a3
Which turns out to not be true. Termination of a CDN service by FilCDN will:
withCDN(so it's actually a more reliable indicator than the code comment above suggests)cdnEndEpochto be the current epoch (via therailTerminatedcallback from Payments) instead of0The CDN rail IDs are left intact after this operation.
So we either need to bother with fishing around in metadata, or we should check
cdnEndEpoch==0as well.