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.

}
                txns.emplace_back(MakeTransactionRef(std::move(mtx)));
            }
            NodeContext& node = EnsureAnyNodeContext(request.context);
            CTxMemPool& mempool = EnsureMemPool(node);
            Chainstate& chainstate = EnsureChainman(node).ActiveChainstate();
            const auto package_result = WITH_LOCK(::cs_main, return ProcessNewPackage(chainstate, mempool, txns,  false));
            
            switch(package_result.m_state.GetResult()) {
                case PackageValidationResult::PCKG_RESULT_UNSET: break;
                case PackageValidationResult::PCKG_POLICY:
                {
                    throw JSONRPCTransactionError(TransactionError::INVALID_PACKAGE,
                        package_result.m_state.GetRejectReason());
                }
                case PackageValidationResult::PCKG_MEMPOOL_ERROR:
                {
                    throw JSONRPCTransactionError(TransactionError::MEMPOOL_ERROR,
                        package_result.m_state.GetRejectReason());
                }
                case PackageValidationResult::PCKG_TX:
                {
                    for (const auto& tx : txns) {
                        auto it = package_result.m_tx_results.find(tx->GetWitnessHash());
                        if (it != package_result.m_tx_results.end() && it->second.m_state.IsInvalid()) {
                            throw JSONRPCTransactionError(TransactionError::MEMPOOL_REJECTED,
                                strprintf("%s failed: %s", tx->GetHash().ToString(), it->second.m_state.GetRejectReason()));
                        }
                    }