Skip to content

getBlockRange() returns an error for range of 1. #398

@ehamery

Description

@ehamery

The getBlockRange method returns an error for valid input:

tronweb/src/lib/trx.js

Lines 516 to 517 in 4b131bb

if (!utils.isInteger(end) || end <= start)
return callback('Invalid end of range provided');

It should be < instead of <=:

if (!utils.isInteger(end) || end < start)
    return callback('Invalid end of range provided'); 

If end is equal to start, I expect to get 1 block instead of error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions