mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
Issue a warning when filtering by height but also asking for mempool transactions, fix #37
This commit is contained in:
parent
e3dcc96a60
commit
000a1d5cff
4 changed files with 60 additions and 41 deletions
|
@ -1,4 +1,5 @@
|
|||
import sys
|
||||
import warnings
|
||||
from .address import address
|
||||
from .numbers import PaymentID
|
||||
|
||||
|
@ -160,7 +161,12 @@ class PaymentFilter(object):
|
|||
_payment_id = filterparams.pop('payment_id', None)
|
||||
if len(filterparams) > 0:
|
||||
raise ValueError("Excessive arguments for payment query: {}".format(filterparams))
|
||||
|
||||
if self.unconfirmed and (self.min_height is not None or self.max_height is not None):
|
||||
warnings.warn("Height filtering (min_height/max_height) has been requested while "
|
||||
"also asking for unconfirmed transactions. These are mutually exclusive. "
|
||||
"As mempool transactions have no height at all, they will be excluded "
|
||||
"from the result.",
|
||||
RuntimeWarning)
|
||||
if _local_address is None:
|
||||
self.local_addresses = []
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue