iquidus / explorer

An open source block explorer
BSD 3-Clause "New" or "Revised" License
747 stars 1.33k forks source link

Explorer data is not correct? #477

Closed rameshjois closed 3 years ago

rameshjois commented 3 years ago

Screenshot_20210819-093110

Total transaction do not sum up to the number shown in the total shown on the top for total recieved and total sent

nghiacc commented 3 years ago

This looks correct to me. The sum amount of outputs should be lower than the sum amount of inputs due to miner fees.

uaktags commented 3 years ago

this number is from your transaction vouts:

https://explorer.givelotus.com/api/getrawtransaction?txid=91197cd8046454e04e34e172d17852a48d3d0ebbba5c001d8d5c453d553f98de&decrypt=1 https://explorer.givelotus.com/api/getrawtransaction?txid=39ab6f1dde1c1a5fcd19e371bb14f7f980b7103188839c7130368ff7772e7b43&decrypt=1 etc

If you look at the VOUT, add all of the value for your Xph address, you'll get the Total Received.

The address page is showing you a sum/difference from the transaction (vin of ~333XPI - the vout of 33XPI going to someone else in transaction ending in 2e7b43) leaves you with a VOUT that's incoming back to you of 299 and change.

So, due to your transactions sending out (vin) of X and you're one of the 2 recipients who receives (vout) X-Y, then the system is able to calculate that you've Received (vout) 1351XPI.

If you'd like this to change, then i'd recommend looking into the database.js and adding logic in there to cancel out recording same address calculations.

Please, in the future while asking for help, don't hide an address or QR code that allows someone to be able to look at your explorer and your chain to try and diagnose. It was a pain to have to type by hand one of the transaction hashes, then deduce which one of 2 addresses were yours, when you could have just shown the QR code. If you don't want to show YOUR address, show another that shows a similar concern.

rameshjois commented 3 years ago

Ok, i saw received was too huge compared to actually I received, hence thought of bringing here