Merge pull request #1369 from filecoin-project/fix/reward-ticket-count
pass ticket count into reward application message
This commit is contained in:
commit
7b5e7178f4
@ -142,6 +142,7 @@ type BlockMessages struct {
|
|||||||
Miner address.Address
|
Miner address.Address
|
||||||
BlsMessages []store.ChainMsg
|
BlsMessages []store.ChainMsg
|
||||||
SecpkMessages []store.ChainMsg
|
SecpkMessages []store.ChainMsg
|
||||||
|
TicketCount int64
|
||||||
}
|
}
|
||||||
|
|
||||||
type ExecCallback func(cid.Cid, *types.Message, *vm.ApplyRet) error
|
type ExecCallback func(cid.Cid, *types.Message, *vm.ApplyRet) error
|
||||||
@ -207,9 +208,10 @@ func (sm *StateManager) ApplyBlocks(ctx context.Context, pstate cid.Cid, bms []B
|
|||||||
|
|
||||||
var err error
|
var err error
|
||||||
params, err := actors.SerializeParams(&reward.AwardBlockRewardParams{
|
params, err := actors.SerializeParams(&reward.AwardBlockRewardParams{
|
||||||
Miner: b.Miner,
|
Miner: b.Miner,
|
||||||
Penalty: penalty,
|
Penalty: penalty,
|
||||||
GasReward: gasReward,
|
GasReward: gasReward,
|
||||||
|
TicketCount: b.TicketCount,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cid.Undef, cid.Undef, xerrors.Errorf("failed to serialize award params: %w", err)
|
return cid.Undef, cid.Undef, xerrors.Errorf("failed to serialize award params: %w", err)
|
||||||
@ -335,6 +337,7 @@ func (sm *StateManager) computeTipSetState(ctx context.Context, blks []*types.Bl
|
|||||||
Miner: b.Miner,
|
Miner: b.Miner,
|
||||||
BlsMessages: make([]store.ChainMsg, 0, len(bms)),
|
BlsMessages: make([]store.ChainMsg, 0, len(bms)),
|
||||||
SecpkMessages: make([]store.ChainMsg, 0, len(sms)),
|
SecpkMessages: make([]store.ChainMsg, 0, len(sms)),
|
||||||
|
TicketCount: int64(len(b.EPostProof.Proofs)),
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, m := range bms {
|
for _, m := range bms {
|
||||||
|
Loading…
Reference in New Issue
Block a user