# Due an internal limitation on legacy wallets, the redeem script limit also applies to p2sh-segwit and bech32 (even when the scripts are valid)
# We take this as a "good thing" to tell users to upgrade to descriptors.
assert_raises_rpc_error(-4,"Unsupported multisig script size for legacy wallet. Upgrade to descriptors to overcome this limitation for p2sh-segwit or bech32 scripts",wallet_multi.addmultisigaddress,16,pubkeys,'','p2sh-segwit')
assert_raises_rpc_error(-4,"Unsupported multisig script size for legacy wallet. Upgrade to descriptors to overcome this limitation for p2sh-segwit or bech32 scripts",wallet_multi.addmultisigaddress,16,pubkeys,'','bech32')