(
self, settle_timeout: BlockTimeout, reveal_timeout: BlockTimeout
)
| 207 | return self.raiden.config.python_api |
| 208 | |
| 209 | def _raise_for_invalid_channel_timeouts( |
| 210 | self, settle_timeout: BlockTimeout, reveal_timeout: BlockTimeout |
| 211 | ) -> None: |
| 212 | min_reveal_timeout = self.config.minimum_reveal_timeout |
| 213 | if reveal_timeout < min_reveal_timeout: |
| 214 | if reveal_timeout <= 0: |
| 215 | raise InvalidRevealTimeout("reveal_timeout should be larger than zero.") |
| 216 | else: |
| 217 | raise InvalidRevealTimeout( |
| 218 | "reveal_timeout is lower than the required minimum value of" |
| 219 | f" { min_reveal_timeout }" |
| 220 | ) |
| 221 | |
| 222 | if settle_timeout < reveal_timeout * 2: |
| 223 | raise InvalidSettleTimeout( |
| 224 | "`settle_timeout` can not be smaller than double the " |
| 225 | "`reveal_timeout`.\n " |
| 226 | "\n " |
| 227 | "The setting `reveal_timeout` determines the maximum number of " |
| 228 | "blocks it should take a transaction to be mined when the " |
| 229 | "blockchain is under congestion. This setting determines the " |
| 230 | "when a node must go on-chain to register a secret, and it is " |
| 231 | "therefore the lower bound of the lock expiration. The " |
| 232 | "`settle_timeout` determines when a channel can be settled " |
| 233 | "on-chain, for this operation to be safe all locks must have " |
| 234 | "been resolved, for this reason the `settle_timeout` has to be " |
| 235 | "larger than `reveal_timeout`." |
| 236 | ) |
| 237 | |
| 238 | def get_channel( |
| 239 | self, |
no test coverage detected