monero-ecosystem / monero-python

A comprehensive Python module for handling Monero cryptocurrency
BSD 3-Clause "New" or "Revised" License
247 stars 80 forks source link

Fixed Daemon.block bug for height=0 #93

Closed jeffro256 closed 3 years ago

jeffro256 commented 3 years ago

If you called daemon.block(height=0) then the expression:

if not height and not bhash:

Is True because 0 is falsey. I changed that line to a slightly more wordy, but more accurate:

if height is None and bhash is None: