Prevent stratum new tx message from being printed if not added to mempool
This commit is contained in:
parent
3cde3800de
commit
83d8db23d5
|
@ -692,14 +692,17 @@ func (s *Server) HandleMempoolData(data mempool.Mempool) {
|
||||||
|
|
||||||
var highFeeReceived bool
|
var highFeeReceived bool
|
||||||
for _, tx := range data {
|
for _, tx := range data {
|
||||||
//prevent a lot of calls if not needed
|
|
||||||
if utils.GlobalLogLevel&utils.LogLevelDebug > 0 {
|
|
||||||
utils.Debugf("Stratum", "new tx id = %s, size = %d, weight = %d, fee = %s", tx.Id, tx.BlobSize, tx.Weight, utils.XMRUnits(tx.Fee))
|
|
||||||
}
|
|
||||||
|
|
||||||
if s.mempool.Add(tx) && tx.Fee >= HighFeeValue {
|
if s.mempool.Add(tx) {
|
||||||
highFeeReceived = true
|
if tx.Fee >= HighFeeValue {
|
||||||
utils.Noticef("Stratum", "high fee tx received: %s, %s", tx.Id, utils.XMRUnits(tx.Fee))
|
//prevent a lot of calls if not needed
|
||||||
|
if utils.GlobalLogLevel&utils.LogLevelDebug > 0 {
|
||||||
|
utils.Debugf("Stratum", "new tx id = %s, size = %d, weight = %d, fee = %s", tx.Id, tx.BlobSize, tx.Weight, utils.XMRUnits(tx.Fee))
|
||||||
|
}
|
||||||
|
|
||||||
|
highFeeReceived = true
|
||||||
|
utils.Noticef("Stratum", "high fee tx received: %s, %s", tx.Id, utils.XMRUnits(tx.Fee))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue