Skip to content

Conversation

@foriequal0
Copy link
Contributor

No description provided.

@foriequal0 foriequal0 requested a review from remagpie November 19, 2019 08:04
@remagpie remagpie mentioned this pull request Nov 19, 2019
21 tasks
Comment on lines +366 to +368
let client = client.client();
let (tx, rx) = snapshot_notify::create();
client.engine().register_snapshot_notify_sender(tx);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you move this?

Copy link
Contributor Author

@foriequal0 foriequal0 Nov 19, 2019

Choose a reason for hiding this comment

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

It has a little bit of a complicated story. In Tendermint, Worker waits for some register_* functions to be called before it fires up its event loop. It is implemented with crossbeam::channel and it requires to be called orderly and thoroughly. So I moved it there so the last register_ function is called unconditionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These weird initialization steps need to be cleaned up, but it should be an another PR.

@foriequal0 foriequal0 merged commit 412eeaa into CodeChain-io:feature/snapshot Nov 19, 2019
@foriequal0 foriequal0 deleted the snapshot/tendermint-periodic branch November 19, 2019 10:05
@foriequal0 foriequal0 mentioned this pull request Dec 4, 2019
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