- (Digest::MD5.hexdigest(portable_manifest) +
- '+' +
- portable_manifest.bytesize.to_s)
- end
-
- def maybe_clear_replication_confirmed
- if manifest_text_changed?
- # If the new manifest_text contains locators whose hashes
- # weren't in the old manifest_text, storage replication is no
- # longer confirmed.
- in_old_manifest = {}
- self.class.each_manifest_locator(manifest_text_was) do |loc|
- in_old_manifest[loc.hash] = true
- end
- self.class.each_manifest_locator(manifest_text) do |loc|
- if not in_old_manifest[loc.hash]
- self.replication_confirmed_at = nil
- self.replication_confirmed = nil
- break
- end
- end
- end