<p><code>testmempoolaccept</code> is a RPC which lets you dry-run submitting a transaction like <code>sendrawtransaction</code>, without actually pushing the transaction into your mempool or to the p2p network. Both function identically other than the final operation of broadcasting, so error messages can be considered equal.</p>

CC BY-SA 4.0
2021-03-21T01:55:34.860Z
2021-03-21T01:55:34.860Z
Claris
<p>You can do so by building a raw transaction in the debug console (but be very careful, you can lose your funds if you're not experienced).</p>
<p>When building raw transactions you can think of it in three basic steps.</p>
<ol>
<li>Create Raw Transaction <code>createrawtransaction</code> (<a href="https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/createrawtransaction/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/createrawtransaction/</a>)</li>
<li>Sign Raw Transaction <code>signrawtransactionwithkey</code> (<a href="https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/signrawtransactionwithkey/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/signrawtransactionwithkey/</a>)</li>
<li>Broadcast <code>sendrawtransaction</code> (<a href="https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/sendrawtransaction/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/sendrawtransaction/</a>)</li>
</ol>
<p>The hexadecimal response you receive after signing (step 2) is your fully signed transaction.</p>

CC BY-SA 4.0
2021-03-21T01:56:58.953Z
2021-03-21T01:56:58.953Z
m1xolyd1an
<p>I would like the create a transaction without broadcasting it to the network.</p>

<bitcoin-core>
How to create a transaction without broadcasting
Anton
# How to create a transaction without broadcasting

(Asked by: username_0 on 2021-03-20)

I would like the create a transaction without broadcasting it to the network.

**Tags:** bitcoin-core


---

## 2 answers

### Answer by username_1 on 2021-03-21. Score: 3

`testmempoolaccept` is a RPC which lets you dry-run submitting a transaction like `sendrawtransaction`, without actually pushing the transaction into your mempool or to the p2p network. Both function identically other than the final operation of broadcasting, so error messages can be considered equal.


---

### Answer by username_2 on 2021-03-21. Score: 1

You can do so by building a raw transaction in the debug console (but be very careful, you can lose your funds if you're not experienced).

When building raw transactions you can think of it in three basic steps.

1. Create Raw Transaction `createrawtransaction` (<https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/createrawtransaction/>)
2. Sign Raw Transaction `signrawtransactionwithkey` (<https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/signrawtransactionwithkey/>)
3. Broadcast `sendrawtransaction` (<https://bitcoincore.org/en/doc/0.18.0/rpc/rawtransactions/sendrawtransaction/>)

The hexadecimal response you receive after signing (step 2) is your fully signed transaction.


---

