return false
}
+func isNoGasStatusFail(tx *types.Tx, statusFail bool) bool {
+ if !statusFail {
+ return false
+ }
+
+ for _, input := range tx.TxData.Inputs {
+ if *consensus.BTMAssetID == input.AssetID() {
+ return false
+ }
+ }
+ return true
+}
+
//IsDust checks if a tx has zero output
func (tp *TxPool) IsDust(tx *types.Tx) bool {
if ok := isTransactionZeroOutput(tx); ok {
log.WithFields(log.Fields{"module": logModule, "tx_id": tx.ID.String()}).Warn("dust tx")
return false, nil
}
+
+ if isNoGasStatusFail(tx, statusFail); ok {
+ log.WithFields(log.Fields{"module": logModule, "tx_id": tx.ID.String()}).Warn("drop no gas status fail tx")
+ return false, nil
+ }
return tp.processTransaction(tx, statusFail, height, fee)
}