<p>If you are running a node, you can call the getblocktemplate API and you'll actually see all the transactions within the mempool. </p>

<p>This site shows the <a href="https://chainquery.com/bitcoin-api/getblocktemplate/true" rel="nofollow">mempool transactions</a>. You then get your code to typically sort from highest fees to lowest fees, run other checks such as is it within the MAX_BLOCK_SIZE and then create a block header that is to be hashed. </p>

<p><em>Which part of the network is responsible for giving miners the correct block to hash?</em></p>

<p>That would be your network. You create the block header and send it somewhere to start the hashing process. That somewhere could be your laptop, it could be a dedicated miner connected to your laptop or it could be a dedicated miner connected to a raspberry pi that is connected to your home/local network. </p>

CC BY-SA 3.0
2016-04-28T04:04:27.130Z
2016-04-28T04:04:27.130Z
cloudnthings
<p>The mempool as it is called, stores transactions that are propagated by the peer to peer network.  Miners have the ability to select which transactions they include in the block.  It is beneficial for the miners to collect as many transactions as possible so they can obtain the most amount of fees that they can.</p>

CC BY-SA 3.0
2016-04-28T01:21:58.937Z
2016-04-28T01:21:58.937Z
Mark S.
<p>How are the latest transactions collected into new block to send them to miners for hashing? Which part of the network is responsible for giving miners the correct block to hash?</p>

<transaction-fees><mining-theory><transaction-selection>
How are transactions collected into new block?
Sebastian Xawery Wiśniowiecki
# How are transactions collected into new block?

(Asked by: username_0 on 2016-04-27)

How are the latest transactions collected into new block to send them to miners for hashing? Which part of the network is responsible for giving miners the correct block to hash?

**Tags:** transaction-fees, mining-theory, transaction-selection


---

## 2 answers

### Answer by username_1 on 2016-04-28. Score: 2

If you are running a node, you can call the getblocktemplate API and you'll actually see all the transactions within the mempool.

This site shows the [mempool transactions](https://chainquery.com/bitcoin-api/getblocktemplate/true). You then get your code to typically sort from highest fees to lowest fees, run other checks such as is it within the MAX\_BLOCK\_SIZE and then create a block header that is to be hashed.

*Which part of the network is responsible for giving miners the correct block to hash?*

That would be your network. You create the block header and send it somewhere to start the hashing process. That somewhere could be your laptop, it could be a dedicated miner connected to your laptop or it could be a dedicated miner connected to a raspberry pi that is connected to your home/local network.


---

### Answer by username_2 on 2016-04-28. Score: 2

The mempool as it is called, stores transactions that are propagated by the peer to peer network. Miners have the ability to select which transactions they include in the block. It is beneficial for the miners to collect as many transactions as possible so they can obtain the most amount of fees that they can.


---

