bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Unable to settle more than total debt amount in individual settlement fund when no sufficient price feeds #2587

Closed abitmore closed 1 year ago

abitmore commented 2 years ago

Bug Description

If a BitAsset's individual settlement fund is not empty, and there is no sufficient price feeds, it is unable to settle an amount which is greater than the total debt amount in the individual settlement fund. This is due to a lack of a null price check in code https://github.com/bitshares/bitshares-core/blob/2c2e0ef4cc4e22b11630f0ca0ac8334760b52f10/libraries/chain/asset_evaluator.cpp#L1343-L1346 which is required in later code https://github.com/bitshares/bitshares-core/blob/f291bccaa330b4896487e67e94fbc98cd522f995/libraries/chain/db_market.cpp#L908

This is not critical since the BitAsset holders can still request smaller amounts.

Steps To Reproduce

TBD

Expected Behavior

The individual settlement fund normally pays the force settlement request, and the excess amount is returned to the requester.

Host Environment Please provide details about the host environment. Much of this information can be found running: witness_node --version.

Impacts Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.

CORE TEAM TASK LIST

abitmore commented 1 year ago

Fixed by #2716.