Charge input steps also on blocked transaction
@@ -130,12 +130,6 @@ func (th *transactionHandler) DoExecute(cc contract.CallContext, estimate, isPat
if !cc.ApplySteps(state.StepTypeDefault, 1) {
return scoreresult.ErrOutOfStep, nil, nil
}
- if !isPatch {
- if err := th.checkBlocked(cc); err != nil {
- return err, nil, nil
- }
- }
-
if cnt, err := MeasureBytesOfData(cc.Revision(), th.data); err != nil {
return nil, nil, err
} else {
@@ -143,6 +137,11 @@ func (th *transactionHandler) DoExecute(cc contract.CallContext, estimate, isPat
return scoreresult.ErrOutOfStep, nil, nil
}
}
+ if !isPatch {
+ if err := th.checkBlocked(cc); err != nil {
+ return err, nil, nil
+ }
+ }
// Execute
status, used, _, addr := cc.Call(th.chandler, cc.StepAvailable())
