Skip to content

Commit 707341d

Browse files
diwufeiwenta0li
andauthored
add chain disputer cmd: for wdPoSt disputer (#4449)
Co-authored-by: 一页素书 <[email protected]>
1 parent 95d0277 commit 707341d

File tree

4 files changed

+430
-2
lines changed

4 files changed

+430
-2
lines changed

app/submodule/apitypes/chain.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ type ProtocolParams struct {
3535
}
3636

3737
type Deadline struct {
38-
PostSubmissions bitfield.BitField
38+
PostSubmissions bitfield.BitField
39+
DisputableProofCount uint64
3940
}
4041

4142
// BlsMessages[x].cid = Cids[x]

app/submodule/chain/miner_api.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,14 @@ func (msa *minerStateAPI) StateMinerDeadlines(ctx context.Context, maddr address
279279
return err
280280
}
281281

282+
l, err := dl.DisputableProofCount()
283+
if err != nil {
284+
return err
285+
}
286+
282287
out[i] = apitypes.Deadline{
283-
PostSubmissions: ps,
288+
PostSubmissions: ps,
289+
DisputableProofCount: l,
284290
}
285291
return nil
286292
}); err != nil {

cmd/chain.go

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ var chainCmd = &cmds.Command{
2828
"ls": chainLsCmd,
2929
"set-head": chainSetHeadCmd,
3030
"getblock": chainGetBlockCmd,
31+
"disputer": chainDisputeSetCmd,
3132
},
3233
}
3334

0 commit comments

Comments
 (0)