Skip to content

Conversation

@random-zebra
Copy link

Should close #2156

This bug is caused by the fact that a transparent input is usally 148 bytes (149 for p2cs spends), but can also be 149 sometimes (150 for p2cs spends), depending on the script length.
When a user copies "After fee" in coin-control, and sends it to a single recipient, this extra fee is typically (with few coins selected) offset by the lack of change output. But, when many inputs are selected in coin control, this becomes relevant.

Also:

  • remove the duplicated definitions of CTXIN_SPEND_DUST_SIZE and CTXOUT_REGULAR_SIZE in sapling_operation.h
  • remove the extra byte for the (nullopt) special payload, as that is not serialized for version=1 or type=0 transactions (and currently isn't possible to send special txes with the GUI).

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, ACK d284220.

@furszy furszy requested a review from Fuzzbawls October 14, 2021 19:48
@furszy furszy modified the milestones: 5.4.0, 5.3.2.1 Oct 15, 2021
@furszy furszy merged commit 4bb2436 into PIVX-Project:master Oct 15, 2021
furszy added a commit that referenced this pull request Oct 16, 2021
ac81ee6 GUI: bugfix, set locked label invisible for shield notes. (furszy)
6cdb6df sendmany: fix not set min depth for legacy transactions. (furszy)
74c4b9d [BUG][GUI] Refine bytes/fee/"after fee" calculation in coin-control (random-zebra)
a5d236a GUI: dashboard chart, fix last day of the month not being shown. (furszy)

Pull request description:

  List of PRs to backport to the v5.3 branch for a small and concrete bugs fixing release v5.3.2.1 (zero risk release).

  * #2568
  * #2578
  * #2592
  * #2593

ACKs for top commit:
  random-zebra:
    utACK ac81ee6
  Fuzzbawls:
    ACK ac81ee6

Tree-SHA512: 81a69e3e7ee342c4194cd34b9d230e6c2cfe5a77d3b58631aeb69406caf4e14a82f521b9df9f9953fcad6d93044e76740523b3e8eaa7d4ec6bf3079b6b2b6c95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Cold Staked UTXOs After Fee is not calculated properly

2 participants