Skip to content
This repository has been archived by the owner on Sep 27, 2019. It is now read-only.

Server adjudicator watcher #466

Merged
merged 21 commits into from
May 9, 2019
Merged

Conversation

kerzhner
Copy link
Contributor

@kerzhner kerzhner commented May 7, 2019

This PR addresses part of #437.

  • Adds channel_id to the AllocatorChannel table.
  • A standalone process monitors for chain events.
  • A basic unit test that spins up the process, sends an event to Ganache and waits for the event listener to fire.
  • Dynamically import locally-built artifacts vs prebuilt artifacts based on the environment.

Remaining items that can be addressed in future pull requests:

  • Event monitors and tests for events other than funding.
  • Spin up the adjudicator watcher when deploying to Heroku.
  • Local setup for manual/integration testing of the server and wallet pointing to the same Ganache instance.

@kerzhner kerzhner had a problem deploying to rps-autoplayer-staging May 8, 2019 15:16 Failure
@kerzhner kerzhner force-pushed the adjudicator-watcher-common-data branch from e58cdf0 to 53f3e4b Compare May 8, 2019 19:27
@kerzhner kerzhner had a problem deploying to rps-autoplayer-staging May 8, 2019 19:51 Failure
@kerzhner kerzhner had a problem deploying to rps-autoplayer-staging May 8, 2019 20:09 Failure
@kerzhner kerzhner had a problem deploying to rps-autoplayer-staging May 8, 2019 20:13 Failure
@kerzhner kerzhner temporarily deployed to rps-autoplayer-staging May 8, 2019 20:17 Inactive
@kerzhner kerzhner temporarily deployed to rps-autoplayer-staging May 8, 2019 20:22 Inactive
@kerzhner kerzhner temporarily deployed to rps-autoplayer-staging May 8, 2019 20:25 Inactive
@kerzhner kerzhner force-pushed the adjudicator-watcher-common-data branch from e4d578e to 53f3e4b Compare May 8, 2019 20:32
Copy link
Contributor

@tomclose tomclose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

const eventCallback = async eventType => {
const postEventHoldings = await getHoldings();

const eventDeposit = bigNumberify(postEventHoldings).sub(bigNumberify(preEventHoldings));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this name a bit confusing. Maybe something like depositedAmount would be clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, @tomclose.

};
}

export async function depositContract(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe depositIntoContract or makeDeposit?

@tomclose tomclose force-pushed the adjudicator-watcher-common-data branch from 85c1e8e to 6ecab82 Compare May 9, 2019 08:22
@tomclose tomclose merged commit be9aba4 into master May 9, 2019
@tomclose tomclose deleted the adjudicator-watcher-common-data branch May 9, 2019 08:33
kerzhner added a commit that referenced this pull request May 9, 2019
kerzhner added a commit that referenced this pull request May 9, 2019
kerzhner added a commit that referenced this pull request May 9, 2019
lalexgap pushed a commit to statechannels/statechannels that referenced this pull request Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants