semiotic-ai / timeline-aggregation-protocol

A fast, efficient and trust-minimized unidirectional micro-payments system.
Apache License 2.0
14 stars 3 forks source link

collect_receipts perform batch even if it's failed #209

Closed gusinacio closed 6 months ago

gusinacio commented 8 months ago

Before creating the RAV, it collects all the receipts and performs checks in batch.

The problem is that in case any prior check fails, the CheckAndReserveEscrow check will return an error because you are trying to reserve escrow on a Failed receipt and you get the following error message:

The requested action is invalid for current receipt state: Failed

Note that with the new architecture of the lib this error is impossible to happen because you cannot reserve on a failed receipt.

gusinacio commented 6 months ago

Fixed by the refactor