12 CONTRIBUTION_FILE_NAME =
"contrib"
13 FINAL_FILE_NAME =
"final-upload"
18 A null handler that accepts contributions and simply stores them as
19 subsequent challenges. When the MPC has completed, the latest contribution
20 is moved to 'final-upload'. Can be used for testing coordinator
21 configuration (certificate setup, etc).
25 return CONTRIBUTION_FILE_NAME
28 self, _contributionn_idx: int, file_name: str) -> bool:
29 os.rename(file_name, CONTRIBUTION_FILE_NAME)
33 assert not os.path.exists(FINAL_FILE_NAME)
34 if os.path.exists(CONTRIBUTION_FILE_NAME):
35 os.rename(CONTRIBUTION_FILE_NAME, FINAL_FILE_NAME)
37 print(
"WARNING: no contributions found")