monero-integrations/monerophp

get_transfers doesn't work as expected when minimum (and possibly maximum) block height is specified

mrmena opened this issue · 1 comments

The wallet RPC documentation allows for filtering of transfers by block height. The monerophp get_transfers method has the optional $min_height and $max_height parameters but they don't work unless the filter_by_height parameter is also set, which it isn't

After some digging, it looks like if you don't explicitly set the $max_height parameter to something less than the max (4206931337), the filter_by_height parameter doesn't get set.

Relevant source line:

if (($min_height || $max_height) && $max_height != 4206931337) {
    $params['filter_by_height'] = true;
}

Shouldn't I be able to filter by only setting the minimum block height?