Difference between revisions of "Update Status"

From Open Transactions
Jump to navigation Jump to search
(Sequence: clarify procedure for calculating target series)
m
Line 19: Line 19:
 
### 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 next un-thawed series.
+
## If the input stack is empty, <code>nextinputstart</code> is the first [[address identifier]] for the the series after inputstop.
 
## 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]]

Revision as of 20:52, 8 July 2015

Initial Conditions

Sequence

  1. Update the status for any split outBailments which exist:
    1. Split outBailments have more than one item in their outpoints array and have an existing status value of "success".
    2. Change the status for all split outBailments from "success" to "split".
  2. Update the status for any partial outBailments which exist:
    1. Partial outBailments have existing status value of "partial-".
    2. Calculate the total missing value needed to satisfy the partial outputs.
    3. 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).
      1. Obtain a list of eligible inputs from the series after inputstop and calculate their total value.
      2. If the eligible value of this series is greater than the total missing value, then the series after inputstop is the target series.
        1. If not, repeat the above process while keeping a running total of eligible value until a target series is located.
      3. Append the number of the target series to the status value for every partial series.
  3. Update the nextinputstart value.
    1. If the input stack is empty, nextinputstart is the first address identifier for the the series after inputstop.
    2. If the input stack is not empty, nextinputstart is the address identifier for the next input in the stack.