settxfee: formula for fixed fee I want to set fixed fee rate for transaction. I calculated tx size which is 222( here is this tx), called rpc settxfee
$o-&gt;settxfee(sprintf('%f', (0.00001/222)*1000));

and sent to the network. I supposed fee would set for tx to 0.00001 but set to 0.00000662 TBTC instead. Here is wallet info  &quot;paytxfee&quot;: 0.00004500,, seems  settxfee worked as expected. What do I do wrong?
Big disclaimer: you really shouldn't do this. Transaction prioritization works based on fee per size, so that's what you should be configuring.
As for an explanation of what you're seeing: the block explorer you're using is showing the wrong size. For fee computations what you need is the vsize, not the serialized size. This is the size that takes the discount for witness data introduced by BIP141 (segwit) into account.
The vsize of your transaction is 141, not 222.