Merge pull request #1161 from jzelinskie/torrenthmac

misc torrent changes
This commit is contained in:
Jimmy Zelinskie 2016-01-22 23:02:44 -05:00
commit 85ae1a2a0a
7 changed files with 14 additions and 14 deletions

View file

@ -216,7 +216,7 @@ def put_image_layer(namespace, repository, image_id):
sr.add_handler(size_hndlr)
# Add a handler to hash the chunks of the upload for torrenting
piece_hasher = PieceHasher(app.config['TORRENT_PIECE_SIZE'])
piece_hasher = PieceHasher(app.config['BITTORRENT_PIECE_SIZE'])
sr.add_handler(piece_hasher.update)
# Add a handler which computes the checksum.
@ -240,7 +240,7 @@ def put_image_layer(namespace, repository, image_id):
size_info.compressed_size,
size_info.uncompressed_size)
pieces_bytes = piece_hasher.final_piece_hashes()
model.storage.save_torrent_info(updated_storage, app.config['TORRENT_PIECE_SIZE'], pieces_bytes)
model.storage.save_torrent_info(updated_storage, app.config['BITTORRENT_PIECE_SIZE'], pieces_bytes)
# Append the computed checksum.
csums = []