Skip to content

Allow for settling of accountant promises - #1421

Merged
vkuznecovas merged 1 commit into
payment-v2-messagingfrom
settle-accountant-promise
Nov 25, 2019
Merged

Allow for settling of accountant promises#1421
vkuznecovas merged 1 commit into
payment-v2-messagingfrom
settle-accountant-promise

Conversation

@vkuznecovas

Copy link
Copy Markdown
Contributor

Initial implementation of the accountant promise settling.

The promise settler is launched on node start.
Once launched, it checks the local keystore for addresses.
For each address, it keeps a state in memory. The state is loaded from BC and local DB.
The state stores the current balance information as well as registration status for the provider.

It also listens for service start events, and performs the steps mentioned above if a new identity is used for service start.

It is also listening for events that are emitted once a new accountant promise is emitted. These events cause the internal state to be updated with the latest promise.
After the mentioned state update a check is performed. If the current balance is less than the threshold * available balance it indicates it's time to settle the promise.

The settle part is missing still, as the transactor is missing the relevant endpoint.

Updates #1413

Initial implementation of the accountant promise settling.

The promise settler is launched on node start.
Once launched, it checks the local keystore for addresses.
For each address, it keeps a state in memory. The state is loaded from BC and local DB.
The state stores the current balance information as well as registration status for the provider.

It also listens for service start events, and performs the steps mentioned above if a new identity is used for service start.

It is also listening for events that are emitted once a new accountant promise is emitted. These events cause the internal state to be updated with the latest promise.
After the mentioned state update a check is performed. If the current balance is less than the threshold * available balance it indicates it's time to settle the promise.

The settle part is missing still, as the transactor is missing the relevant endpoint.

Updates #1413
@vkuznecovas
vkuznecovas merged commit 116e900 into payment-v2-messaging Nov 25, 2019
@vkuznecovas
vkuznecovas deleted the settle-accountant-promise branch November 25, 2019 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants