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

fix syncing new blocks we have locally when not connected to any peers #114

Merged
merged 2 commits into from
Aug 2, 2019

Conversation

whyrusleeping
Copy link
Member

The problem was that we were always going to blocksync service even if we still had the data locally.

One step better here is likely to just not sync blocks from ourselves over pubsub, but pull them in through a special fast route. But we can do that later (doing things the way we are now has fewer special cases).

Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

1 nit

@@ -577,3 +577,22 @@ func (cs *ChainStore) blockContainsMsg(blk *types.BlockHeader, msg cid.Cid) (*ty
func (cs *ChainStore) Blockstore() blockstore.Blockstore {
return cs.bs
}

func (cs *ChainStore) TryFillTipSet(ts *types.TipSet) (*FullTipSet, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could drop the error

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