In the Bitcoin Core, bitcoin-cli and RPC reject TXs having identical output addresses multiple times. Generally, almost all the codes of Core try to exclude them. But exceptionally, the accompanying bitcoin-tx command omits the duplication check. [https://github.com/bitcoin/bitcoin/search?q=%22duplicated+address%22]
For example, Alice cannot split a 3BTC output (not input) to Bob into two outputs of 1BTC+2BTC in one transaction with 'bitcoin-cli createrawtransaction', but she can with bitcoin-tx. Do you think it's an intended specification of bitcoin-tx or a limitation of the current implementation?
Repeat with bitcoin-cli:
ex$ genesiscoinbase=4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
ex$ input="[{\"txid\":\"$genesiscoinbase\",\"vout\":0}]"
ex$ satoshi=12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S
ex$ bitcoin-cli createrawtransaction "$input" "[{\"$satoshi\": 1.0},{\"$satoshi\":2.0}]"
error code: -8
error message:
Invalid parameter, duplicated address: 12cbQLTFMXRnSzktFkuoG3eHoMeFtpTu3S
Whereas with bitcoin-tx:
$ bitcoin-tx -create in=$genesiscoinbase:0 outaddr=1.0:$satoshi outaddr=2.0:$satoshi
02000000013ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a0000000000ffffffff0200e1f505000000001976a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac00c2eb0b000000001976a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac00000000
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments