explorer icon indicating copy to clipboard operation
explorer copied to clipboard

PoS showing for transaction with inputs

Open markharvilla opened this issue 7 years ago • 2 comments

We noticed in some of our transactions that PoS appears as the only input address. For example, https://paichain.info/tx/d9882a9b6b240facf0393cd77326d83338bff2c47cd96c77e91ee80c1d0846fe

From the code on line 84 of views/tx.jade - https://github.com/iquidus/explorer/blob/master/views/tx.jade#L84 - it appears this should only display if the transaction isn't found to have any vin. However, if we look at the raw transaction of the example I sent above, we can se that it indeed has two vin: https://paichain.info/api/getrawtransaction?txid=d9882a9b6b240facf0393cd77326d83338bff2c47cd96c77e91ee80c1d0846fe&decrypt=1

Any thoughts?

Thank you in advance!

markharvilla avatar Jun 13 '18 21:06 markharvilla

I'm seeing the same issues Mark. PoS transaction that consists of 3 inputs, the block reward for the staker is the output - input. So the actual value of coins created that is displayed in the explorer is correct. But explorer only adds and displays that smaller value in the DB. not the combined value of the 3 inputs + the stake reward. This is causing balance discrepancies on the explorer.

nibbles83 avatar Sep 26 '18 11:09 nibbles83

Transactions as below.

raw tx = https://lindaexplorer.kdhsolutions.co.uk/api/getrawtransaction?txid=fd54c585bb89c6320ab02573e3de2c27e126cb23777c1e15f2c9dd550f08f7bf&decrypt=1

Displayed TX = https://lindaexplorer.kdhsolutions.co.uk/tx/fd54c585bb89c6320ab02573e3de2c27e126cb23777c1e15f2c9dd550f08f7bf

Seems that if the explorer identifies it as PoS it doesn't add the input vin's to the DB, as its assumed that those transactions already exist in the stakers account.

nibbles83 avatar Sep 26 '18 11:09 nibbles83