1

I am making a bitcoin laravel package.

I have a table with all transactions. The txid and the address are unique together. So it is possible to have only one column with the same txid and address.

Is it possible to send a bitcoin transaction with the same address twice? Because when it is my table structure isn't right.

Sample transaction(address: amount):

1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.01
1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.04
1NsC7NJfkFgp9ppeJdD38PrY3Yy92o88cu: 0.06

Is this transaction possible? Or would it be automatically this

1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.05
1NsC7NJfkFgp9ppeJdD38PrY3Yy92o88cu: 0.06

1 Answer 1

1

A transaction can have several inputs come from a single address and can have several outputs go to the same address.

It is also possible that there are more inputs in that same address and that they're spent in a different transaction or that money is sent to addresses which have already been used (and may or may not still hold money).

You may also want to have a look at this when coming up with data structures: https://en.bitcoin.it/wiki/Transaction_Malleability

3
  • I see the listtransactions has a vout key. Can I use this to check if transaction already exists(in my imported transactions) or is there another way to see the difference between the transactions? Because the time, amount, address, confirmations and txid can be the same..
    – Jan Wytze
    Mar 8, 2017 at 18:44
  • The thing here is that you have to define for yourself what it means that 2 transactions are "the same". One possible definition is that 2 transactions are "the same" if and only if all their scripts match.
    – UTF-8
    Mar 8, 2017 at 21:53
  • 1
    I just tried making a transaction with multiple of the same addresses in the output. And this was the result: Invalid parameter, duplicated address: . So is bitcoind just blocking it or is a duplicate address in the transaction not possible in bitcoin?
    – Jan Wytze
    Mar 9, 2017 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.