Post
Topic
Board Bitcoin Technical Support
Re: Small UTXOs
by
HCP
on 17/02/2021, 03:41:58 UTC
Used this one, I am just not sure about the type of transaction.
What if it is combined? 30 P2SH and 10 bech32 inputs, how do I enter it?
If it is from a wallet that you have created then the input types should be the same since wallets don't usually generate more then one type of address.

OP is using Bitcoin Core... which will let you generate all three... Legacy, Nested and Native... (and create MultiSig's if you want Tongue)
I am using bitcoin core, bitcoin-cli but I am constructing the raw transaction manually.

So, it's entirely possible they have 30 P2SH and 10 bech32 inputs... Generally, it's caused by unchecking the "generate native segwit (bech 32) address" box in the "receive" tab... this will give you a P2SH-P2WPKH (nested) receive address... but when you spend these coins, Bitcoin Core will default to bech32 change addresses if you haven't explicitly set it using the commandline arguments.

Quote from: Bitcoin Core commandline options
-addresstype
What type of addresses to use ("legacy", "p2sh-segwit", or "bech32", default: "bech32")

-changetype
What type of change to use ("legacy", "p2sh-segwit", or "bech32"). Default is same as -addresstype, except when -addresstype=p2sh-segwit a native segwit output is used when sending to a native segwit address)