peer.getStrategy()
.getUploadStrategy()
.blockRequestCancelled(peer.getTorrent(), block,
peer.getTorrentPeer());
} else if (msg instanceof BlockMessage) {
final BlockMessage message = (BlockMessage) msg;
final TorrentPiece piece = peer.getTorrent().getPiece(
message.pieceIndex);
final TorrentPieceBlock block = piece.getBlock(message.begin,
message.data.remaining());