瀏覽代碼

Push random bytes.

Push random bytes rather than zeros.
Steven Engler 6 年之前
父節點
當前提交
3c56352dca
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/basic_protocols.py

+ 1 - 1
src/basic_protocols.py

@@ -191,7 +191,7 @@ class PushDataProtocol(Protocol):
 		return False
 	#
 	def _default_data_generator(self, index, bytes_needed):
-		return b'0'*bytes_needed
+		return os.urandom(bytes_needed)
 	#
 #
 class PullDataProtocol(Protocol):