core: don't check systemfee with UTXO outputs

SystemFee is already being checked by verifyTx against Sender's balance.
This commit is contained in:
Roman Khimov 2020-05-28 21:10:46 +03:00
parent d9400800e3
commit 31ef0c4339

View file

@ -1593,15 +1593,6 @@ func (bc *Blockchain) verifyResults(t *transaction.Transaction, results []*trans
if len(resultsDestroy) == 1 && resultsDestroy[0].AssetID != UtilityTokenID() { if len(resultsDestroy) == 1 && resultsDestroy[0].AssetID != UtilityTokenID() {
return errors.New("tx destroys non-utility token") return errors.New("tx destroys non-utility token")
} }
sysfee := t.SystemFee
if sysfee.GreaterThan(util.Fixed8(0)) {
if len(resultsDestroy) == 0 {
return fmt.Errorf("system requires to pay %s fee, but tx pays nothing", sysfee.String())
}
if resultsDestroy[0].Amount.LessThan(sysfee) {
return fmt.Errorf("system requires to pay %s fee, but tx pays %s only", sysfee.String(), resultsDestroy[0].Amount.String())
}
}
switch t.Type { switch t.Type {
case transaction.ClaimType: case transaction.ClaimType: