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

some code cannot enter execution in handlePreCommitFailed #2693

Closed
diwufeiwen opened this issue Jun 24, 2020 · 1 comment
Closed

some code cannot enter execution in handlePreCommitFailed #2693

diwufeiwen opened this issue Jun 24, 2020 · 1 comment

Comments

@diwufeiwen
Copy link
Contributor

https://github.com/filecoin-project/storage-fsm/blob/master/states_failed.go#L91
if pci, is := m.checkPreCommitted(ctx, sector); is && pci != nil {
// do something
}

func (m *Sealing) checkPreCommitted(ctx statemachine.Context, sector SectorInfo) (*miner.SectorPreCommitOnChainInfo, bool) {
tok, _, err := m.api.ChainHead(ctx.Context())
if err != nil {
log.Errorf("handleSealPrecommit1Failed(%d): temp error: %+v", sector.SectorNumber, err)
return nil, true // pci==nil && is ?
}

info, err := m.api.StateSectorPreCommitInfo(ctx.Context(), m.maddr, sector.SectorNumber, tok)
if err != nil {
	log.Errorf("handleSealPrecommit1Failed(%d): temp error: %+v", sector.SectorNumber, err)
	return nil, true  // pci==nil && is ?
}

return info, false  // pci!=nil && !is

}

@daviddias daviddias transferred this issue from filecoin-project/storage-fsm Jul 30, 2020
@arajasek
Copy link
Contributor

arajasek commented Jul 3, 2021

Fixed in #3445

@arajasek arajasek closed this as completed Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants