Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Aug 3, 2022

Seems better to target the exact weight than a weight that is up to more than 2000 WU larger.

Also, replace a broad -acceptnonstdtxn=1 with -datacarriersize=100000 to document the test assumptions better.

Also, replace broad -acceptnonstdtxn=1 with -datacarriersize=100000
@fanquake fanquake added the Tests label Aug 3, 2022
@glozow glozow requested a review from theStack August 4, 2022 09:04
Copy link
Contributor

@theStack theStack left a comment

Choose a reason for hiding this comment

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

Code-review ACK fa2537c

TIL that the Python repetition operator * also accepts negative values and simple yields empty (byte-)strings in that case:

>>> b'a' * -1337
b''

(Intuitively, I would have preferred to keep the first assertion, checking that the target weight is larger than the current tx's weight, in order to prevent a negative dummy_vbytes value, but it doesn't seem to have any negative consequences (no pun intended)🤷‍♂️ ).

@maflcko maflcko merged commit 2c3115d into bitcoin:master Aug 4, 2022
@maflcko maflcko deleted the 2208-test-exact-bulk-weight-🏞 branch August 4, 2022 17:24
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 4, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants