Look at block base fee

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-10-11 21:14:51 +02:00
parent 40b2e2d0c1
commit a36ec27230
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -926,6 +926,11 @@ func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *t
return false, messageMethod, types.NewInt(0), nil
}
if tipset.Blocks()[0].ParentBaseFee.GreaterThan(r.proveFeeCapMax) {
log.Debugw("skipping high base fee message", "method", messageMethod, "cid", msg.Cid, "miner", m.To, "basefee", tipset.Blocks()[0].ParentBaseFee, "fee_cap_max", r.proveFeeCapMax)
return false, messageMethod, types.NewInt(0), nil
}
var sn abi.SectorNumber
var proveCommitSector miner0.ProveCommitSectorParams
@ -982,6 +987,11 @@ func (r *refunder) processTipsetStorageMinerActor(ctx context.Context, tipset *t
return false, messageMethod, types.NewInt(0), nil
}
if tipset.Blocks()[0].ParentBaseFee.GreaterThan(r.preFeeCapMax) {
log.Debugw("skipping high base fee message", "method", messageMethod, "cid", msg.Cid, "miner", m.To, "basefee", tipset.Blocks()[0].ParentBaseFee, "fee_cap_max", r.preFeeCapMax)
return false, messageMethod, types.NewInt(0), nil
}
var precommitInfo miner.SectorPreCommitInfo
if err := precommitInfo.UnmarshalCBOR(bytes.NewBuffer(m.Params)); err != nil {
log.Warnw("failed to decode precommit params", "err", err, "method", messageMethod, "cid", msg.Cid, "miner", m.To)