Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Add support for implicit bounce #379

Open
renatomassaro opened this issue Jan 23, 2018 · 1 comment
Open

Add support for implicit bounce #379

renatomassaro opened this issue Jan 23, 2018 · 1 comment

Comments

@renatomassaro
Copy link
Member

Implicit bounce may happen on at least two scenarios:

  1. Player connects to other servers gradually, creating a "natural bounce". Example: S connects directly to A. Then, using A as origin, connects to B. Then, using B as origin, connects to C. The resulting connection would be: S -> A -> B -> C, without the player ever explicitly creating a bounce.

  2. Player S is connected to bank B1 using bounce B. Connection is: S -> [B] -> B1. Now player will make a transfer (i.e. create a wire_transfer connection) to an account located at bank B2. The transfer connection will be S -> [B] -> B1 -> B2, i.e. origin ATM B1 is added implicitly to the bounce.

Proposed implementation

Have bounces reference themselves (no need for arbitrarily nesting though, one-level is enough). So Bounce.t would have a parent_id that may be nil (explicit bounce) or Bounce.id (implicit bounce).

As long as the Client is properly updated when an implicit bounce is created, everything shall be fine (and we don't need to create a new data structure like e.g. Bounce.Implicit.t)

@renatomassaro
Copy link
Member Author

When implementing, look for references to #379

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant