When you search the hash in blockchain.info
It will give you Error? or Both?
To my knowledge, this is very very rare and I believe its close to impossible. I need clarifications on this however, can someone else help to answer this question?
And same question , what if two trans has same hash? will it be confused by the bitcoin-core or the miners.
This has happened before. We need to understand how transaction hash works to know how it is impossible now.
A transaction hash consist of a double SHA256 hash of the following (in order):
1. A 32-bit version number.
2. inputs used in the transaction
3. outputs and the criteria for spending it
4. 32-bit nlocktime
So, for the transaction IDs to be identical, they must have the exact of the above.
This is only possible if a collision is found or in coinbase transactions(used to be easy).
BIP30 solved the coinbase TXID conflict implications by preventing miners from including any TX that has the same TXID from a previous block and has outputs unspent.[1] BIP34 makes the duplicate coinbase transactions even harder to create by adding block number into coinbase.
[1]
https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki