5

I wrote a script that compares the transactions listed in the memory pool with the transactions included in getblocktemplate:

http://learnmeabitcoin.com/explorer/node/memorypool

(I've ordered the transactions by [current priority], and highlighted the ones included in getblocktemplate in blue.)

  • How does getblocktemplate choose which transactions to include from the memory pool in a candidate block?

  • Why aren't transactions being selected from highest to lowest priority?

Murch
  • 71,155
  • 33
  • 180
  • 600
inersha
  • 2,928
  • 1
  • 17
  • 41

1 Answers1

5

The whole mempool won't fit in a block; getblocktemplate returns enough transactions for a block. Blocks are, by default, limited to 750kb by policy, but many miners increase the size to the block limit of 1mb (which can be done by command-line flag).

The specific piece of code that decides on the transactions that should be included in a block can be found here. It's reasonably well documented, and not terrible to read, I'd suggest taking a look through it to see where your script operates differently.

fluffyponyza
  • 453
  • 3
  • 12