Edits based on comments

Removed outdated paragraph about user requesting refund after timeout (it is now automatic). Added method to retrieve all HTLC contracts by account.
This commit is contained in:
John M. Jones 2018-09-28 13:06:09 -05:00 committed by GitHub
parent 3d4383bf93
commit ed2ff08a5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,8 +88,6 @@ Upon presentation of a `preimage`, the HTLC `condition evaluator` validates:
If all evaluations succeed, the `secured assets` are transferred to the `recipient`. If any evaluation fails, nothing happens; the HTLC remains ready to evaluate the next `preimage`.
Upon presentation of a request from the `depositor` for return of `secured assets`, the HTLC `condition evaluator` validates that the `timeout threshold` is now in the past. It then returns the `secured assets` to `depositor`.
### **Timing of Condition Evaluation**
The `timeout threshold` of the contract is defined by `depositor` within the HTLC at creation. It can be any time in the future and should allow enough time for `recipient` to review the HTLC and provide the `preimage`. Further, it should not be set too far into the future to mitigate against an unresponsive `recipient` impacting `depositor`, as their `secured assets` will be locked until `timeout threshold` expiry. The accuracy is based on when the `condition evaluator` runs, and should be considered accurate ± 15 seconds.
@ -252,7 +250,7 @@ transaction_obj htlc_extend_expiry(depositor, id, timeout_threshold, htlc_extent
return results
```
### **At Expiry**
### **At Expiry** (evaluated at each block commit)
```
Get: get_htlc(id)
@ -273,6 +271,8 @@ transaction_obj htlc_extend_expiry(depositor, id, timeout_threshold, htlc_extent
### **get_htlc**
### **get_htlcs_by_account**
# **Discussion**
https://github.com/bitshares/bsips/pull/104