Skip to content

Conversation

@remagpie
Copy link
Contributor

@remagpie remagpie commented Nov 21, 2019

Original snapshot sync implementation downloaded only the header of the snapshot target.
It introduced lots of problems, so I and @foriequal0 decided to download the body of the snapshot target too.

SnapshotBody state is added to the State enum in sync extension.
Also, import_bootstrap_header in Client is changed to import_trusted_header, import_trusted_block and force_update_best_block.

}

pub fn import_bootstrap_block<'a>(&'a self, block: &'a Block, client: &Client, _importer_lock: &MutexGuard<()>) {
pub fn import_trusted_header<'a>(&'a self, header: &'a Header, client: &Client, _importer_lock: &MutexGuard<()>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it takes unused _importer_lock?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why. I just used the same interface as import_headers.

@foriequal0 foriequal0 merged commit e7977ae into CodeChain-io:feature/snapshot Nov 25, 2019
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants