The idea behind CPFP is that both transactions will go into the same block, thus confirming both transactions at the same time. A transaction cannot be considered confirmed nor added into a block unless its parent is also confirmed, be it previously or in the same block.
OK... With the fall out of the BIP66 SPV Miners who were not performing complete block verification, I got worried. I was looking for codified consensus rules. I see that the
COrphan class does take dependencies into account in the
HaveCoins check. Also,
HaveCoins is checking for mempool dependencies on incoming transactions from peers.
So I'm convinced that bitcoind is handling this for miners using
getblocktemplate, but how many miners out there are using their own custom code?
So feeding my paranoia for a bit here, even if a miner running custom code did submit a new block with an unfunded tx (since the tx was in mempool), then hopefully the clients would reject it. I searched through
ConnectBlock, looking for where this was checked, like with
HaveCoins, but eventually gave up.
So if mempool dependencies are already taken into account, then what does CPFP do? Best I can tell it adjusts the priority weighting calculate child and parent together. True?
Thx