<blockquote>
  <p>Do I really need to put more than 1000 transactions [in a block] to see my transactions going in different blocks</p>
</blockquote>

<p>No.  You can limit the size of the blocks you produce by changing the <code>-blockmaxsize</code> option.  For example, if you only want to be able to add a single 250-byte transaction plus the 80-byte header and 1-byte (in this case) transaction count, you can start Bitcoin Core like this:</p>

<pre><code>bitcoind -testnet -daemon -blockmaxsize=331
</code></pre>

<p>Then you can use the prioritisetransaction RPC to prioritize tx1 over tx2.</p>

<p>Regarding your second question, estimatefee and estimatepriority may not return useful results on testnet because transaction volume there is low so almost every transaction goes into the next block.</p>

<p>You may find it more useful to experiment with <a href="https://bitcoin.org/en/developer-examples#regtest-mode" rel="nofollow">regression test mode</a> which will allow you to create a private testing network and completely control every block (as well as mine blocks instantly).</p>

CC BY-SA 3.0
2015-10-28T14:30:53.923Z
2015-10-28T14:30:53.923Z
David A. Harding
<p>This question is not a duplicate of <a href="https://bitcoin.stackexchange.com/questions/35347/can-miners-choose-which-transactions-to-mine">Can miners choose which transactions to mine?</a></p>
<p>Everybody seems to agree on the fact that miners can select which transactions they are mining. But I can't find a way to do it!
I created a personal bitcoin network (testnet protocol) where I'm the only miner. I send transactions to my several (fake) nodes and get them all in the mempool.</p>
<p>For demonstration purposes, I want some of the transactions (with high fees) to be includeed in the first block and the rest in the second one. I tried to use <code>prioritisetransaction</code> (with my miner node) to do this but all the transactions went to the same block:</p>
<blockquote>
<p>bitcoin-cli prioritisetransaction txId1 5000 200</p>
<p>bitcoin-cli prioritisetransaction txId2 0 -200</p>
</blockquote>
<p>I put arbitrary values, the goal is to mine Tx1 in the first block and Tx2 in the second or even after. How can I create such a behavior? Do I really need to put more than 1000 transactions to see my transactions going in different blocks?</p>
<p>I will welcome any help, thank you in advance.</p>
<p>EDIT: I'm adding a question to this post. On another lead to find a way to &quot;choose&quot; in wich block my transaction will be included I tried &quot;estimatefee/priority&quot; calls. In my private bitcoin network (height: 14.000 blocks) when I call:</p>
<blockquote>
<p>bitcoin-cli estimatefee X</p>
</blockquote>
<p>whatever X (number of block before inclusion), the answer is &quot;-1&quot; which means that the network cannot estimate what I'm asking (should only append for high digits). Do I need more blocks in my Blockchain? More transactions? Same experiment in the real testnet, <code>estimatefee</code> works but is really far from the reality and whatever the fee, all my transactions go to the first block.</p>

CC BY-SA 3.0
2015-06-16T12:49:15.063Z
I found this discussion also, but nobody really answers the actual question: http://bitcoin.stackexchange.com/questions/7311/how-do-miners-select-which-transactions-to-include-in-a-block
Hugo Borne
CC BY-SA 3.0
2015-06-16T16:22:02.350Z
Have you tried `prioritisetransaction txid2 -1000000 -1000000` ?
Nick ODell
CC BY-SA 3.0
2015-06-17T07:58:48.370Z
I tried :
bitcoin-cli prioritisetransaction txId1 1000000 1000000
bitcoin-cli prioritisetransaction txId2 -1000000 -1000000 without success
Hugo Borne
CC BY-SA 3.0
2015-10-13T08:50:10.327Z
the function estimatefee basically returns an ordered statistics overs the at most 100 times 25 = 2500 transactions. If you don't have enough txs in your blockchain, it cannot perform this sort of calculation.
ClementWalter
<transactions><transaction-fees><transaction-selection>
How can a miner choose which transaction to include in the next block?
Hugo Borne
# How can a miner choose which transaction to include in the next block?

(Asked by: username_0 on 2015-06-16)

This question is not a duplicate of [Can miners choose which transactions to mine?](https://bitcoin.stackexchange.com/questions/35347/can-miners-choose-which-transactions-to-mine)

Everybody seems to agree on the fact that miners can select which transactions they are mining. But I can't find a way to do it!
I created a personal bitcoin network (testnet protocol) where I'm the only miner. I send transactions to my several (fake) nodes and get them all in the mempool.

For demonstration purposes, I want some of the transactions (with high fees) to be includeed in the first block and the rest in the second one. I tried to use `prioritisetransaction` (with my miner node) to do this but all the transactions went to the same block:

> bitcoin-cli prioritisetransaction txId1 5000 200
>
> bitcoin-cli prioritisetransaction txId2 0 -200

I put arbitrary values, the goal is to mine Tx1 in the first block and Tx2 in the second or even after. How can I create such a behavior? Do I really need to put more than 1000 transactions to see my transactions going in different blocks?

I will welcome any help, thank you in advance.

EDIT: I'm adding a question to this post. On another lead to find a way to "choose" in wich block my transaction will be included I tried "estimatefee/priority" calls. In my private bitcoin network (height: 14.000 blocks) when I call:

> bitcoin-cli estimatefee X

whatever X (number of block before inclusion), the answer is "-1" which means that the network cannot estimate what I'm asking (should only append for high digits). Do I need more blocks in my Blockchain? More transactions? Same experiment in the real testnet, `estimatefee` works but is really far from the reality and whatever the fee, all my transactions go to the first block.

**Tags:** transactions, transaction-fees, transaction-selection

> **Comments:**
> **username_0**: I found this discussion also, but nobody really answers the actual question: http://bitcoin.stackexchange.com/questions/7311/how-do-miners-select-which-transactions-to-include-in-a-block  
> **username_1**: Have you tried `prioritisetransaction txid2 -1000000 -1000000` ?  
> **username_0**: I tried : bitcoin-cli prioritisetransaction txId1 1000000 1000000 bitcoin-cli prioritisetransaction txId2 -1000000 -1000000 without success  
> **username_2**: the function estimatefee basically returns an ordered statistics overs the at most 100 times 25 = 2500 transactions. If you don't have enough txs in your blockchain, it cannot perform this sort of calculation.  

---

## 1 answers

### Answer by username_3 on 2015-10-28. Score: 2

> Do I really need to put more than 1000 transactions [in a block] to see my transactions going in different blocks

No. You can limit the size of the blocks you produce by changing the `-blockmaxsize` option. For example, if you only want to be able to add a single 250-byte transaction plus the 80-byte header and 1-byte (in this case) transaction count, you can start Bitcoin Core like this:

```
bitcoind -testnet -daemon -blockmaxsize=331

```

Then you can use the prioritisetransaction RPC to prioritize tx1 over tx2.

Regarding your second question, estimatefee and estimatepriority may not return useful results on testnet because transaction volume there is low so almost every transaction goes into the next block.

You may find it more useful to experiment with [regression test mode](https://bitcoin.org/en/developer-examples#regtest-mode) which will allow you to create a private testing network and completely control every block (as well as mine blocks instantly).


---

