While some protocols require value attached to OP_RETURN outputs, this otherwise seems like a mistake.

Setting the value to 0 should really be done by the wallet/script creating the transaction (like createrawtransaction does for `data` outputs). However, as an additional check, similar to the high-fee check, sendrawtransaction could also check for non-zero value OP_RETURN outputs.

This should be configurable by a new RPC argument.

See also https://transactionfee.info/charts/output-opreturn-amount/

#### Useful skills:

* Bitcoin Core RPC code
* Transaction output types
* Bitcoin Core functional tests

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

NONFATAL_UNREACHABLE();
                }
            }
            size_t num_broadcast{0};
            for (const auto& tx : txns) {
                std::string err_string;
                const auto err = BroadcastTransaction(node, tx, err_string, 0, true, true);
                if (err != TransactionError::OK) {
                    throw JSONRPCTransactionError(err,
                        strprintf("transaction broadcast failed: %s (all transactions were submitted, %d transactions were broadcast successfully)",
                            err_string, num_broadcast));
                }
                num_broadcast++;
            }
            UniValue rpc_result{UniValue::VOBJ};
            UniValue tx_result_map{UniValue::VOBJ};
            std::set<uint256> replaced_txids;
            for (const auto& tx : txns) {
                auto it = package_result.m_tx_results.find(tx->GetWitnessHash());
                CHECK_NONFATAL(it != package_result.m_tx_results.end());
                UniValue result_inner{UniValue::VOBJ};
                result_inner.pushKV("txid", tx->GetHash().GetHex());
                const auto& tx_result = it->second;
                if (it->second.m_result_type == MempoolAcceptResult::ResultType::DIFFERENT_WITNESS) {
                    result_inner.pushKV("other-wtxid", it->second.m_other_wtxid.value().GetHex());
                }
                if (it->second.m_result_type == MempoolAcceptResult::ResultType::VALID ||
                    it->second.m_result_type == MempoolAcceptResult::ResultType::MEMPOOL_ENTRY) {
                    result_inner.pushKV("vsize", int64_t{it->second.m_vsize.value()});
                    UniValue fees(UniValue::VOBJ);