user127763: I would like to check the validity of a raw transaction (i.e. whether it would be accepted by network nodes), without broadcasting the transaction to the network. I am interested in knowing what is the best way to achieve this 1) using Bitcoin Core's RPC API 2) by any other means (e.g. open source tool).
Am I correct in stating that the sendrawtransaction RPC method first validates a transaction before attempting to broadcast the transaction to the network?
Edit - I'm aware that the decoderawtransaction method can be used to manually/visually assess the details of a transaction, but I'd like to be 100% sure that the transaction signatures and parameters are correct without having to actually broadcast the transaction.

user208: The RPC you're looking for is testmempoolaccept. It checks whether a raw transaction would be accepted into the local mempool, without actually doing so. Only transactions that satisfy all consensus rules, plus various policy rules, are accepted into the mempool.

Am I correct in stating that the sendrawtransaction RPC method first validates a transaction before attempting to broadcast the transaction to the network.

Yes, broadcasting invalid transactions would be simultaneously bad for privacy, and risk being banned by your peer nodes.

127763: <p>I would like to check the validity of a raw transaction (i.e. whether it would be accepted by network nodes), without broadcasting the transaction to the network. I am interested in knowing what is the best way to achieve this 1) using Bitcoin Core's RPC API 2) by any other means (e.g. open source tool).</p>
<p>Am I correct in stating that the <code>sendrawtransaction</code> RPC method first validates a transaction before attempting to broadcast the transaction to the network?</p>
<p>Edit - I'm aware that the <code>decoderawtransaction</code> method can be used to manually/visually assess the details of a transaction, but I'd like to be 100% sure that the transaction signatures and parameters are correct without having to actually broadcast the transaction.</p>
 208: <p>The RPC you're looking for is <code>testmempoolaccept</code>. It checks whether a raw transaction would be accepted into the local mempool, without actually doing so. Only transactions that satisfy all consensus rules, plus various policy rules, are accepted into the mempool.</p>
<blockquote>
<p>Am I correct in stating that the <code>sendrawtransaction</code> RPC method first validates a transaction before attempting to broadcast the transaction to the network.</p>
</blockquote>
<p>Yes, broadcasting invalid transactions would be simultaneously bad for privacy, and risk being banned by your peer nodes.</p>
