Merge pull request #10555 from filecoin-project/asr/fix-extend-sectors-backport
backport: fix: miner: correctly count sector extensions
This commit is contained in:
commit
0b018e56cd
@ -1160,8 +1160,9 @@ var sectorsExtendCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
sectorsInDecl := int(sectorsWithoutClaimsCount) + len(sectorsWithClaims)
|
sectorsInDecl := int(sectorsWithoutClaimsCount) + len(sectorsWithClaims)
|
||||||
|
scount += sectorsInDecl
|
||||||
|
|
||||||
if scount+sectorsInDecl > addrSectors || len(p.Extensions) >= declMax {
|
if scount > addrSectors || len(p.Extensions) >= declMax {
|
||||||
params = append(params, p)
|
params = append(params, p)
|
||||||
p = miner.ExtendSectorExpiration2Params{}
|
p = miner.ExtendSectorExpiration2Params{}
|
||||||
scount = sectorsInDecl
|
scount = sectorsInDecl
|
||||||
@ -1230,7 +1231,7 @@ var sectorsExtendCmd = &cli.Command{
|
|||||||
smsg, err := fullApi.MpoolPushMessage(ctx, &types.Message{
|
smsg, err := fullApi.MpoolPushMessage(ctx, &types.Message{
|
||||||
From: mi.Worker,
|
From: mi.Worker,
|
||||||
To: maddr,
|
To: maddr,
|
||||||
Method: builtin.MethodsMiner.ExtendSectorExpiration,
|
Method: builtin.MethodsMiner.ExtendSectorExpiration2,
|
||||||
Value: big.Zero(),
|
Value: big.Zero(),
|
||||||
Params: sp,
|
Params: sp,
|
||||||
}, spec)
|
}, spec)
|
||||||
|
Loading…
Reference in New Issue
Block a user