Skip to content

Commit 691a6ec

Browse files
committed
add chain disputer cmd: for wdPoSt disputer
1 parent 39a41a3 commit 691a6ec

File tree

4 files changed

+429
-2
lines changed

4 files changed

+429
-2
lines changed

app/submodule/chain/api_types.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
@@ -308,8 +308,14 @@ func (minerStateAPI *MinerStateAPI) StateMinerDeadlines(ctx context.Context, mad
308308
return err
309309
}
310310

311+
l, err := dl.DisputableProofCount()
312+
if err != nil {
313+
return err
314+
}
315+
311316
out[i] = Deadline{
312-
PostSubmissions: ps,
317+
PostSubmissions: ps,
318+
DisputableProofCount: l,
313319
}
314320
return nil
315321
}); 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)