From 0108d016f1ac6eb48490489f8076a9fc8c6f06cd Mon Sep 17 00:00:00 2001 From: Dirk McCormick Date: Thu, 1 Sep 2022 16:31:35 +0200 Subject: [PATCH] feat: write sealing state changes to the deal log --- storagemarket/deal_execution.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storagemarket/deal_execution.go b/storagemarket/deal_execution.go index f07d2d210..c1c554e16 100644 --- a/storagemarket/deal_execution.go +++ b/storagemarket/deal_execution.go @@ -111,15 +111,16 @@ func (p *Provider) execDeal(deal *smtypes.ProviderDealState, dh *dealHandler) *d return derr } - p.dealLogger.Infow(deal.DealUuid, "deal execution completed successfully") // deal has been sent for sealing -> we can cleanup the deal state now and simply watch the deal on chain // to wait for deal completion/slashing and update the state in DB accordingly. p.cleanupDeal(deal) p.dealLogger.Infow(deal.DealUuid, "finished deal cleanup after successful execution") // Watch the sealing status of the deal and fire events for each change + p.dealLogger.Infow(deal.DealUuid, "watching deal sealing state changes") p.fireSealingUpdateEvents(dh, deal.DealUuid, deal.SectorID) p.cleanupDealHandler(deal.DealUuid) + p.dealLogger.Infow(deal.DealUuid, "deal sealing reached termination state") // TODO // Watch deal on chain and change state in DB and emit notifications. @@ -632,6 +633,7 @@ func (p *Provider) fireSealingUpdateEvents(dh *dealHandler, dealUuid uuid.UUID, return si.State } + p.dealLogger.Infow(dealUuid, "sealing state: %s", si.State) p.fireEventDealUpdate(dh.Publisher, deal) } return si.State