Previously, pad_tx was overpadding transactions by at least 1 byte. This was caused by at least 2 reasons:
- the byte encoding the data length after the OP_RETURN was not taken into
- the additional byte required by OP_PUSHDATA1 when the data length exceeded 0x4c was not taken into account
This is an attempt to make the resulting length match the required length in most situation.
Now, it should only differ in cases where the request size is less than one empty vout (10 bytes) above the current tx size.