From 63c8b8edd192b87a270475d348a7749806f934f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 18 Oct 2021 09:55:28 +0200 Subject: [PATCH] Fix used sectors space accounting after AddPieceFailed --- extern/storage-sealing/input.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extern/storage-sealing/input.go b/extern/storage-sealing/input.go index b69cf8c19ea..875c33cdf17 100644 --- a/extern/storage-sealing/input.go +++ b/extern/storage-sealing/input.go @@ -60,6 +60,10 @@ func (m *Sealing) handleWaitDeals(ctx statemachine.Context, sector SectorInfo) e return ctx.Send(SectorAddPiece{}) }, } + } else { + // make sure we're only accounting for pieces which were correctly added + // (note that m.assignedPieces[sid] will always be empty here) + m.openSectors[sid].used = used } go func() {