| 245 | } |
| 246 | |
| 247 | fn verifier_sign( |
| 248 | &mut self, |
| 249 | verifier_context: &VerifierContext, |
| 250 | secret_nonces: &HashMap<Txid, HashMap<usize, SecNonce>>, |
| 251 | ) { |
| 252 | self.assert_initial_transaction.pre_sign( |
| 253 | verifier_context, |
| 254 | &self.connector_b, |
| 255 | &secret_nonces[&self.assert_initial_transaction.tx().compute_txid()], |
| 256 | ); |
| 257 | self.assert_final_transaction.pre_sign( |
| 258 | verifier_context, |
| 259 | &self.connector_d, |
| 260 | &secret_nonces[&self.assert_final_transaction.tx().compute_txid()], |
| 261 | ); |
| 262 | self.disprove_chain_transaction.pre_sign( |
| 263 | verifier_context, |
| 264 | &self.connector_b, |
| 265 | &secret_nonces[&self.disprove_chain_transaction.tx().compute_txid()], |
| 266 | ); |
| 267 | self.disprove_transaction.pre_sign( |
| 268 | verifier_context, |
| 269 | &self.connector_5, |
| 270 | &secret_nonces[&self.disprove_transaction.tx().compute_txid()], |
| 271 | ); |
| 272 | self.kick_off_timeout_transaction.pre_sign( |
| 273 | verifier_context, |
| 274 | &self.connector_1, |
| 275 | &secret_nonces[&self.kick_off_timeout_transaction.tx().compute_txid()], |
| 276 | ); |
| 277 | self.start_time_timeout_transaction.pre_sign( |
| 278 | verifier_context, |
| 279 | &self.connector_1, |
| 280 | &self.connector_2, |
| 281 | &secret_nonces[&self.start_time_timeout_transaction.tx().compute_txid()], |
| 282 | ); |
| 283 | self.take_1_transaction.pre_sign( |
| 284 | verifier_context, |
| 285 | &self.connector_0, |
| 286 | &self.connector_b, |
| 287 | &secret_nonces[&self.take_1_transaction.tx().compute_txid()], |
| 288 | ); |
| 289 | self.take_2_transaction.pre_sign( |
| 290 | verifier_context, |
| 291 | &self.connector_0, |
| 292 | &self.connector_5, |
| 293 | &secret_nonces[&self.take_2_transaction.tx().compute_txid()], |
| 294 | ); |
| 295 | |
| 296 | self.n_of_n_presigned = true; // TODO: set to true after collecting all n of n signatures |
| 297 | } |
| 298 | |
| 299 | fn push_verifier_nonces( |
| 300 | &mut self, |