dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

fix: avoid calling functions that change wallet state inside of `assert(...)` #6123

Closed UdjinM6 closed 1 month ago

UdjinM6 commented 1 month ago

Issue being fixed or feature implemented

Functions that change the state should not be called inside asserts

kudos to @kwvg for noticing https://github.com/dashpay/dash/pull/6116#discussion_r1681163803

What was done?

Move them out

How Has This Been Tested?

Breaking Changes

n/a

Checklist:

PastaPastaPasta commented 1 month ago

Looks fine; should we backport this or don't bother?

knst commented 1 month ago

Looks fine; should we backport this or don't bother?

it woks years, maybe even 10 years. I don't feel like necessary to backport