(uri_extension_hash, needed_shares, total_shares, size) = res
r = self._results
r.uri_extension_hash = uri_extension_hash
+ r.uri_extension_data = self._encoder.get_uri_extension_data()
f_times = self._fetcher.get_times()
r.timings["cumulative_fetch"] = f_times["cumulative_fetch"]
r.ciphertext_fetched = self._fetcher.get_ciphertext_fetched()
(sharemap, ueb_data, ueb_hash) = res
self.log("found file in grid", level=log.NOISY, parent=lp)
results.uri_extension_hash = ueb_hash
+ results.sharemap = {}
+ for shnum, peerids in sharemap.items():
+ peers_s = ",".join(["[%s]" % idlib.shortnodeid_b2a(peerid)
+ for peerid in peerids])
+ results.sharemap[shnum] = "Found on " + peers_s
+ results.uri_extension_data = ueb_data
return True
return False
d.addCallback(_checked)
# stash these for URI generation later
self._needed_shares = k
self._total_shares = n
+ self._segment_size = segment_size
def _got_encryption_key(self, key):
self._key = key
def _build_readcap(self, upload_results):
self.log("upload finished, building readcap")
r = upload_results
+ assert r.uri_extension_data["needed_shares"] == self._needed_shares
+ assert r.uri_extension_data["total_shares"] == self._total_shares
+ assert r.uri_extension_data["segment_size"] == self._segment_size
+ assert r.uri_extension_data["size"] == self._size
u = uri.CHKFileURI(key=self._key,
uri_extension_hash=r.uri_extension_hash,
needed_shares=self._needed_shares,