biteasy / blockchain-api

Biteasy Blockchain REST API
20 stars 12 forks source link

BTC transacted value may be wrong? #6

Closed chriswill closed 10 years ago

chriswill commented 10 years ago

Here's a transaction from Testnet. https://www.biteasy.com/testnet/transactions/1e496ef6b6ff77105fa1862cfd5044475caab073c302282a9387f6fee44e72ea

I created it to send 1 BTC, with a 0.001 fee, to another account. Bitcoind chose a 10 BTC input.

For the "BTC transacted" data, you report 8.9999. I'd expect to see 1.0. Is that just a factor of it's hard to guess what is an actual spend and what is a change transaction, so you choose the larger of the two?

biteasy commented 10 years ago

Hi Chris,

The transaction looks correct on the website. You send 8.9999 BTC to address mkmLdXb8HrWtFaD2VabHNiN2t8HhBbVZB1, 0.001 was the fee and 1 BTC was the change returned to you so the transacted value is correct.

Perhaps you wanted to send 1 BTC to that address and by mistake you've sent 8.9999 BTC?

chriswill commented 10 years ago

No, what I'm saying is that the 8.9999 was change. I did send 1BTC, the fee was set to 0.0001 before I created the transaction. I had a 10BTC input, which is what the wallet auto-selected.

I don't think if you look at a raw transaction that there is any easy way to say what is the actual "spend amout". All you have is a collection of inputs and outputs. Since you have no way of knowing that mkmLdXb8HrWtFaD2VabHNiN2t8HhBbVZB1 is an address in my wallet (change) it's just guessing really how much the transaction really was for.

I created these transactions with json-rpc, and all addresses were in the same wallet anyway, but I just pushed the transaction to the blockchain as part of my testing.

biteasy commented 10 years ago

Ah, ok. Well, if both addresses are on the same wallet, like you said, it's kinda impossible for us to know which one was the change. We probably need to add a note for the BTC Transacted Value that it's an assumption and not fact :)

Other than that is the site useful to you? Is there some other feedback that you want to give?