Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Broker pallet: fix interlacing (paritytech#2811)
With the current code, when a user interlaces their region, the end result will be three regions in the state: - the non-interlaced region - first part of the interlaced region - second part of the interlaced region The existing implementation retains the non-interlaced region in the state, leading to a problematic scenario: 1. User 1 acquires a region from the market. 2. User 1 then interlaces this region. 3. Subsequently, User 1 transfers one part of the interlaced regions to User 2. Despite this transfer, User 1 retains the ability to assign the entire original non-interlaced region, which is inconsistent with the fact that they no longer own one of the interlaced parts. This PR resolves the issue by removing the original region, ensuring that only the two new interlaced regions remain in the state.
- Loading branch information