Duplicate addresses in transaction possible?

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

Jan Wytze

Posted 2017-03-08T15:15:01.080

Reputation: 289

Answers

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

UTF-8

Posted 2017-03-08T15:15:01.080

Reputation: 2 941

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 2017-03-08T18:44:06.587

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 2017-03-08T21:53:21.437

1I 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 2017-03-09T21:27:57.120