Skip to content
Commit b932e27e authored by Oliver Tale-Yazdi's avatar Oliver Tale-Yazdi Committed by GitHub
Browse files

Fix reentrancy of FrozenBalance::died hook (#10473)



* assets: execute `died` hook outside of mutate

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* assets: extend tests for `died` hook

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* assets: update doc of FrozenBalance::died

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* assets: review fixes

- fix cases where `died` should not have been called
- use `Option<DeadConsequence>` instead of `DeadConsequence`

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* assets: update comment in mock.rs

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>

* assets: return `Remove` in dead_account

The return value is ignored in the only case that it is produced
by a call, but having it this way makes it more understandable.

Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
parent e0260775
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment