Difference between revisions of "Update Status"
Jump to navigation
Jump to search
(Created page with "<div style="float: right"><include iframe src="https://www.lucidchart.com/documents/embeddedchart/b4dcbb56-3b87-4f56-b249-dfd4276c7cc4" width="300" height="800" frameborder="0...") |
m |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
# Update the status for any split outBailments which exist: | # Update the status for any split outBailments which exist: | ||
| − | ## Split outBailments have more than one item in their <code> | + | ## Split outBailments have more than one item in their <code>outpoints</code> array and have an existing <code>status</code> value of "success". |
## Change the <code>status</code> for all split outBailments from "success" to "split". | ## Change the <code>status</code> for all split outBailments from "success" to "split". | ||
# Update the status for any partial outBailments which exist: | # Update the status for any partial outBailments which exist: | ||
| Line 14: | Line 14: | ||
## Calculate the total missing value needed to satisfy the partial outputs. | ## Calculate the total missing value needed to satisfy the partial outputs. | ||
## The missing value of an outBailment is the originally-requested size of the outBailment minus the sum of all outputs created to satisfy it (if any exist). | ## The missing value of an outBailment is the originally-requested size of the outBailment minus the sum of all outputs created to satisfy it (if any exist). | ||
| − | ### Obtain a list of eligible inputs from the | + | ### Obtain a list of eligible inputs from the series after <code>inputstop</code> and calculate their total value. |
| − | ### If the eligible value of | + | ### If the eligible value of this series is greater than the total missing value, then the series after <code>inputstop</code> is the target series. |
#### If not, repeat the above process while keeping a running total of eligible value until a target series is located. | #### If not, repeat the above process while keeping a running total of eligible value until a target series is located. | ||
### Append the number of the target series to the <code>status</code> value for every partial series. | ### Append the number of the target series to the <code>status</code> value for every partial series. | ||
# Update the <code>nextinputstart</code> value. | # Update the <code>nextinputstart</code> value. | ||
| − | ## If the input stack is empty, <code>nextinputstart</code> is the first [[address identifier]] for the | + | ## If the input stack is empty, <code>nextinputstart</code> is the first [[address identifier]] for the the series after <code>inputstop</code>. |
## If the input stack is not empty, <code>nextinputstart</code> is the [[address identifier]] for the next input in the stack. | ## If the input stack is not empty, <code>nextinputstart</code> is the [[address identifier]] for the next input in the stack. | ||
[[Category:Transaction Construction Algorithm (voting pools)|07]] | [[Category:Transaction Construction Algorithm (voting pools)|07]] | ||
Latest revision as of 20:53, 8 July 2015
Initial Conditions
- Every outBailmentID in the output list provided has a non-nil
statusvalue in the withdrawal status object.
Sequence
- Update the status for any split outBailments which exist:
- Split outBailments have more than one item in their
outpointsarray and have an existingstatusvalue of "success". - Change the
statusfor all split outBailments from "success" to "split".
- Split outBailments have more than one item in their
- Update the status for any partial outBailments which exist:
- Partial outBailments have existing
statusvalue of "partial-". - Calculate the total missing value needed to satisfy the partial outputs.
- The missing value of an outBailment is the originally-requested size of the outBailment minus the sum of all outputs created to satisfy it (if any exist).
- Obtain a list of eligible inputs from the series after
inputstopand calculate their total value. - If the eligible value of this series is greater than the total missing value, then the series after
inputstopis the target series.- If not, repeat the above process while keeping a running total of eligible value until a target series is located.
- Append the number of the target series to the
statusvalue for every partial series.
- Obtain a list of eligible inputs from the series after
- Partial outBailments have existing
- Update the
nextinputstartvalue.- If the input stack is empty,
nextinputstartis the first address identifier for the the series afterinputstop. - If the input stack is not empty,
nextinputstartis the address identifier for the next input in the stack.
- If the input stack is empty,