Commit 94c7a44 1 parent 8111dd9 commit 94c7a44 Copy full SHA for 94c7a44
File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -321,18 +321,17 @@ func (p *Parlia) Period() uint64 {
321
321
}
322
322
323
323
func (p * Parlia ) IsSystemTransaction (tx * types.Transaction , header * types.Header ) (bool , error ) {
324
- // deploy a contract
325
- if tx .To () == nil {
324
+ if tx .To () == nil || ! isToSystemContract (* tx .To ()) {
325
+ return false , nil
326
+ }
327
+ if tx .GasPrice ().Sign () != 0 {
326
328
return false , nil
327
329
}
328
330
sender , err := types .Sender (p .signer , tx )
329
331
if err != nil {
330
332
return false , errors .New ("UnAuthorized transaction" )
331
333
}
332
- if sender == header .Coinbase && isToSystemContract (* tx .To ()) && tx .GasPrice ().Cmp (big .NewInt (0 )) == 0 {
333
- return true , nil
334
- }
335
- return false , nil
334
+ return sender == header .Coinbase , nil
336
335
}
337
336
338
337
func (p * Parlia ) IsSystemContract (to * common.Address ) bool {
You can’t perform that action at this time.
0 commit comments