Fair-Squares / fair-squares

Fair housing for all
http://www.fair-squares.nl
Apache License 2.0
16 stars 8 forks source link

Runtime panic: When an asset is finalized before an investor list is assembled #225

Closed ilhanu closed 1 year ago

ilhanu commented 1 year ago

Description

The runtime panics when an asset get's finalised before a investors list is assembled --> event InvestorListCreationSuccessful

Steps to Reproduce

  1. Onboard an asset
  2. Finalize the asset with the finalizer-pallet before the bidding pallet can assemble a succesful list of investors
  3. In the change of the epoch the runtime will panic.

Expected Behavior

_The runtime panic should not be allowed to happen, when the notary finalizes an asset that has not seen the event InvestorListCreationSuccessful, it should report an error and not continue the finalisation process.

Currently we are only looking for if the status is onboarded, but we need to add another state to it for not allowing this to happen_

Logs, Errors or Screenshots

[Additional Information](https://paste.ubuntu.com/p/KfwkC9mZZs/)

ndkazu commented 1 year ago

I think I found out the origin of the problem:

ilhanu commented 1 year ago

I was not able to produce the it with several assets again. Afaik I didn't use the force_process_onboarded_asset call. The manual triggers were temporary created for testing purposes.