Incorrect work settxfee #16958

issue M03G opened this issue on September 24, 2019
  1. M03G commented at 7:15 PM on September 24, 2019: none

    The transaction fee is transferred incorrectly.

    I do

    bitcoin-cli settxfee 0.00088496
    true
    

    or

    $fee = '0.00088496';
    if ($bitcoin->settxfee($fee)) {
    

    and then $redeem = $b->sendtoaddress($address, 0.0001);

    And I expect payment in bytes will be equal to 88.496. And fee is approximately 0.00021 BTC. But it's not. Why?

    Field Val
    Size 247 (bytes)
    Weight 661
    Fees 0.0001469 BTC
    Fee per byte 59.474 sat/B
    Fee per weight unit 22.224 sat/WU
    2019-09-24T16:25:14Z [default wallet] Fee Calculation: Fee:14690 Bytes:166 Needed:14690 Tgt:0 (requested 0) Reason:"PayTxFee set" Decay 0.00000: Est
    imation: (-1 - -1) -nan% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) -nan% 0.0/(0.0 0 mem 0.0 out)
    

    Ubuntu 16.04.3 Bitcoind 0.18.0

    Previously, this problem was not. This started to happen after upgrading to version 0.18.0.

  2. M03G added the label Bug on Sep 24, 2019
  3. MarcoFalke commented at 7:23 PM on September 24, 2019: member

    According to the line in the debug log, the fee is correctly calculated as:

    0.00088496 BTC/kB * 0.168 kB = 0.00014867
    
  4. MarcoFalke commented at 7:24 PM on September 24, 2019: member

    Where did you get the numbers from that are not in the debug log?

  5. M03G commented at 7:32 PM on September 24, 2019: none

    Where did you get the numbers from that are not in the debug log?

    Sorry. Fixed.

    2019-09-24T16:25:14Z [default wallet] Fee Calculation: Fee:14690 Bytes:166 Needed:14690 Tgt:0 (requested 0) Reason:"PayTxFee set" Decay 0.00000: Est
    imation: (-1 - -1) -nan% 0.0/(0.0 0 mem 0.0 out) Fail: (-1 - -1) -nan% 0.0/(0.0 0 mem 0.0 out)
    
  6. M03G commented at 7:34 PM on September 24, 2019: none

    According to the line in the debug log, the fee is correctly calculated as:

    0.00088496 BTC/kB * 0.168 kB = 0.00014867
    

    Now the weight of the transaction is considered differently? Why 0.168 (0.166)? Why not 0.247?

  7. MarcoFalke commented at 7:56 PM on September 24, 2019: member

    Now the weight of the transaction is considered differently? Why 0.168 (0.166)? Why not 0.247?

    The size of the transaction is measured in "virtual bytes" (0.166kB), which does not correspond to the size of the transaction serialized in bytes. The weight is approximately 4 * vbytes (+-3)

  8. MarcoFalke commented at 7:56 PM on September 24, 2019: member

    Usually the issue tracker is used to track technical issues related to the Bitcoin Core code base. Keep in mind that general bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange.

  9. MarcoFalke closed this on Sep 24, 2019

  10. MarcoFalke locked this on Dec 16, 2021
Contributors
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-03 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me