Repository navigation
Conversation
A Bank Node answers a settlement instruction whose net sizes to less than one Cardano output with OBP-BANK-NODE-SETTLEMENT-BELOW-MINIMUM. The amount is fixed by the instruction, so every resend gets the same answer: the relay now parks the row STICKY at once for an operator instead of retrying it until the attempt limit. The classification is a small package-private function with its own test.
…r settle open_corridor.min_settlement_amount.<CURRENCY> sets the smallest net that is settled in a currency. When a pair's net is above zero but below it, POST .../open-corridor/settlements is refused with OBP-40068 before anything is written: the promises stay PENDING and are covered together by a later settle once their net reaches the minimum. Unset means no minimum, as before. Documented in sample.props.template and on the endpoint.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds
open_corridor.min_settlement_amount.<CURRENCY>, the smallest net that is settled in a currency. When a pair's net is above zero but below it,POST /obp/v7.0.0/banks/BANK_ID/open-corridor/settlementsanswers 400OBP-40068before anything is written, so the promises stay PENDING and are covered together by a later settle once their net reaches the minimum (net zero still discharges as before; unset means no minimum). The outbox relay also parks the Bank Node's newOBP-BANK-NODE-SETTLEMENT-BELOW-MINIMUMreply as STICKY at once, since resending the same instruction cannot change it. Documented insample.props.templateand on the endpoint; a Cardano corridor needs a minimum above 1 ADA in its currency, e.g.open_corridor.min_settlement_amount.KES=50.Tests: a new
Http4s700RoutesTestscenario (7.00 under a 10.00 minimum is refused and stays PENDING, then 12.00 settles all three promises) andOpenCorridorReplyClassificationTestfor the relay;Http4s700RoutesTestandDuplicatedMessagespass on H2. Also run on a local cluster with two Bank Nodes on Cardano preprod: withKES=50, a 20 KES net is refused and carried into the next settle, which reaches FINAL.