chain: wire CheckProofSubmissions to computeTipSetState
This commit is contained in:
parent
e48949b41f
commit
0241e31129
@ -125,8 +125,8 @@ type maMethods struct {
|
|||||||
GetSectorSize uint64
|
GetSectorSize uint64
|
||||||
UpdatePeerID uint64
|
UpdatePeerID uint64
|
||||||
ChangeWorker uint64
|
ChangeWorker uint64
|
||||||
IsLate uint64
|
IsLate uint64
|
||||||
CheckMiner uint64
|
CheckMiner uint64
|
||||||
DeclareFaults uint64
|
DeclareFaults uint64
|
||||||
SlashConsensusFault uint64
|
SlashConsensusFault uint64
|
||||||
}
|
}
|
||||||
|
@ -187,6 +187,24 @@ func (sm *StateManager) computeTipSetState(ctx context.Context, blks []*types.Bl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: cron actor
|
||||||
|
ret, err := vmi.ApplyMessage(ctx, &types.Message{
|
||||||
|
To: actors.StoragePowerAddress,
|
||||||
|
From: actors.StoragePowerAddress,
|
||||||
|
Nonce: blks[0].Height,
|
||||||
|
Value: types.NewInt(0),
|
||||||
|
GasPrice: types.NewInt(0),
|
||||||
|
GasLimit: types.NewInt(1 << 30), // Make super sure this is never too little
|
||||||
|
Method: actors.SPAMethods.CheckProofSubmissions,
|
||||||
|
Params: nil,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return cid.Undef, cid.Undef, err
|
||||||
|
}
|
||||||
|
if ret.ExitCode != 0 {
|
||||||
|
return cid.Undef, cid.Undef, xerrors.Errorf("CheckProofSubmissions exit was non-zero: %d", ret.ExitCode)
|
||||||
|
}
|
||||||
|
|
||||||
bs := amt.WrapBlockstore(sm.cs.Blockstore())
|
bs := amt.WrapBlockstore(sm.cs.Blockstore())
|
||||||
rectroot, err := amt.FromArray(bs, receipts)
|
rectroot, err := amt.FromArray(bs, receipts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user