W3C home > Mailing lists > Public > public-interledger@w3.org > March 2016

Calculating the worst case fulfillment length

From: Evan Schwartz <evan@ripple.com>
Date: Wed, 23 Mar 2016 17:00:25 -0700
Message-ID: <CAONA2jVzBrezCwcA--Bxr=p26tSbjeW=VThNK5mkV_yyKUktsg@mail.gmail.com>
To: Interledger Community Group <public-interledger@w3.org>
There was some discussion about how to calculate the worst case scenario
for the length of a threshold fulfillment, given the subconditions' weights
and max lengths.

Here's an algorithm that finds the worst case length relatively
efficiently: https://gist.github.com/emschwartz/844b088c51367b51aff1

Stefan is working on some optimizations that avoid array slicing for the
actual implementation, but this gives the general idea.

Evan Schwartz | Software Architect | Ripple
[image: ripple.com] <http://ripple.com>
Received on Thursday, 24 March 2016 00:01:13 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 24 March 2016 00:01:14 UTC