address review comments.

This commit is contained in:
Raúl Kripalani 2021-03-02 21:29:24 +00:00
parent 68b8e8e9cb
commit 1ac0c9a926
2 changed files with 6 additions and 1 deletions

View File

@ -1549,6 +1549,11 @@ func (cs *ChainStore) WalkSnapshot(ctx context.Context, ts *types.TipSet, inclRe
} }
func (cs *ChainStore) Import(r io.Reader) (*types.TipSet, error) { func (cs *ChainStore) Import(r io.Reader) (*types.TipSet, error) {
// TODO: writing only to the state blockstore is incorrect.
// At this time, both the state and chain blockstores are backed by the
// universal store. When we physically segregate the stores, we will need
// to route state objects to the state blockstore, and chain objects to
// the chain blockstore.
header, err := car.LoadCar(cs.StateBlockstore(), r) header, err := car.LoadCar(cs.StateBlockstore(), r)
if err != nil { if err != nil {
return nil, xerrors.Errorf("loadcar failed: %w", err) return nil, xerrors.Errorf("loadcar failed: %w", err)

View File

@ -1172,7 +1172,7 @@ func (syncer *Syncer) checkBlockMessages(ctx context.Context, b *types.FullBlock
} }
// Finally, flush. // Finally, flush.
return vm.Copy(ctx, tmpbs, syncer.store.StateBlockstore(), mrcid) return vm.Copy(ctx, tmpbs, syncer.store.ChainBlockstore(), mrcid)
} }
func (syncer *Syncer) verifyBlsAggregate(ctx context.Context, sig *crypto.Signature, msgs []cid.Cid, pubks [][]byte) error { func (syncer *Syncer) verifyBlsAggregate(ctx context.Context, sig *crypto.Signature, msgs []cid.Cid, pubks [][]byte) error {