comit-network / comit-rs

Reference implementation of COMIT, an open protocol facilitating trustless cross-blockchain applications.
GNU General Public License v3.0
191 stars 33 forks source link

Generalize swap actions #3365

Closed thomaseizinger closed 3 years ago

thomaseizinger commented 3 years ago

Instead of every client needing to repeat themselves in how specific actions are constructed from the params, we construct the action directly in the swap protocol functions and emit fairly simply actions to the caller.

This simplifies the implementation of clients driving the swap.

Additionally, this is conceptually better from the perspective of the protocol execution function. For this function to be coherent, it should control all parts that are critical to protocol. Building the actual action inside the protocol function provides this control.

mergify[bot] commented 3 years ago

bors r+

bors[bot] commented 3 years ago

Build failed:

thomaseizinger commented 3 years ago

bors retry

bors[bot] commented 3 years ago

Build succeeded: