Block Assembly: Trace the Policy
Sort once: rate descending, fee descending, ID ascending. Scan once. Skipped candidates are not retried.
1 / 6
Sort once: rate descending, fee descending, ID ascending. Scan once. Skipped candidates are not retried.
7/3 exceeds 9/4 because 7×4=28 exceeds 9×3=27. Integer division hides the difference. Cross-products need sufficient width.
500-byte budget, 100-byte coinbase. Initial outputs u and v.
Subsidy 50 gives reward 650. C is not revisited.
Check size and all inputs before consuming any input. Use a temporary UTXO view. Count only accepted sizes and fees. An oversized candidate does not prevent trying a smaller later candidate.
Payload budget 300: A=(200 bytes,400 fee), B=C=(150,285). Greedy selects A for 400; B+C would yield 570. This exercise implements a specified policy, not optimal packing.
Total budget 400, subsidy 50. X=(200,600,u), Y=(150,300,v), Z=(100,100,v). Which candidates fit in rate order? Which outputs remain available after a skip?