Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait for sign state flush on stop #137

Merged
merged 4 commits into from Apr 21, 2023

Conversation

agouin
Copy link
Member

@agouin agouin commented Apr 21, 2023

On process termination (and test completion), wait for async sign state writes to complete before shutting down.

Cleanup unnecessary sync.WaitGroup in WaitAndTerminate, replace with simple chan.

@agouin agouin marked this pull request as ready for review April 21, 2023 17:59
@agouin agouin requested review from DavidNix and mark-rushakoff and removed request for DavidNix April 21, 2023 17:59
Copy link
Member

@mark-rushakoff mark-rushakoff left a comment

Choose a reason for hiding this comment

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

Left a few comments, I'll take another read through after this round.

signer/PvGuard.go Show resolved Hide resolved
signer/threshold_signer.go Show resolved Hide resolved
signer/sign_state.go Show resolved Hide resolved
signer/sign_state.go Outdated Show resolved Hide resolved
signer/threshold_validator.go Outdated Show resolved Hide resolved
Copy link
Member

@mark-rushakoff mark-rushakoff left a comment

Choose a reason for hiding this comment

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

I find this a lot more readable by pulling the mutex out of the Save method.

I commented on two godoc comments, they should be active tense, by convention.

signer/threshold_signer.go Outdated Show resolved Hide resolved
signer/sign_state.go Outdated Show resolved Hide resolved
@agouin agouin merged commit 1c09596 into main Apr 21, 2023
3 checks passed
@agouin agouin deleted the andrew/wait_for_sign_state_write_on_stop branch April 21, 2023 21:00
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.

None yet

2 participants