Will there be a problem if bdiff and pdiff are slightly different?
pdiff, the pool difficulty, is not just a different encoding of the same difficulty. Pools set a different (lower) difficulty so that miners can send them more blocks as shares, and calculate how much work they're doing. Valid blocks are still checked against the normal bdiff before submission to the network