OmniLayer / omniexplorer

Block Explorer for Omni Protocol
Other
51 stars 50 forks source link

Duplicate blocks returned from API #315

Closed conaill closed 5 years ago

conaill commented 5 years ago

I am attempting to pull Tether blocks from the /v1/transaction/address API. When I receive the 10 blocks from a single page, I see two blocks that appear to be duplicated. Are these true duplicates or are they multiple transactions within the same block?

Address = 3MbYQMMmSkC3AgWkj9FMo5LsPTW1zBTwXL page = 4 block = 499234

There are 2 records for block 499234 where the Confirmation, Block, BlockHash, Block Time, Fee, and Amount are all the same. However, the Position in Block and TXID are different.

I am using Python to call the API using the "requests" library. All else appears to be running as expected.

This was my first bug report and hopefully is complete enough for you to assess my question.

Regards Gerald

achamely commented 5 years ago

@conaill the /v1/transaction/address endpoint does not return 'blocks' it returns transactions for an address. In this case the address had more than 1 transaction in the same block. That is why the fields Confirmation, Block, BlockHash, Block Time, Fee, and Amount appear the same but the Position in Block and TXID are different. It was 2 different transactions