```scala
pBlock.addAllOperationAddresses(block.operations.map(encodePOperation _ andThen addToHeap _))
```