From 03f07042ff7d05213a07b973ff7abf38250bb210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Wed, 29 Jan 2020 23:47:28 +0100 Subject: [PATCH] fpost: print message apply result --- api/api_storage.go | 1 + storage/fpost_run.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/api/api_storage.go b/api/api_storage.go index 7f6894c75..5c4362929 100644 --- a/api/api_storage.go +++ b/api/api_storage.go @@ -64,6 +64,7 @@ var SectorStates = []string{ WaitSeed: "WaitSeed", Committing: "Committing", CommitWait: "CommitWait", + FinalizeSector: "FinalizeSector", Proving: "Proving", SealFailed: "SealFailed", diff --git a/storage/fpost_run.go b/storage/fpost_run.go index 1e23bb175..6dd3a8fe1 100644 --- a/storage/fpost_run.go +++ b/storage/fpost_run.go @@ -211,5 +211,19 @@ func (s *fpostScheduler) submitPost(ctx context.Context, proof *actors.SubmitFal log.Infof("Submitted fallback post: %s", sm.Cid()) + go func() { + rec, err := s.api.StateWaitMsg(context.TODO(), sm.Cid()) + if err != nil { + log.Error(err) + return + } + + if rec.Receipt.ExitCode == 0 { + return + } + + log.Errorf("Submitting fallback post %s failed: exit %d", sm.Cid(), rec.Receipt.ExitCode) + }() + return nil }