Describe the bug
Currently anyone can help anyone by claiming their worker rewards. This is a good feature, and is a good smart contract design convention (do not place unneeded restrains).
However, if the account is a new one, claiming would not be successful, since it tries to use claimant's RAM, which is not available if the action caller is not claimant.
Expected behavior
Either:
- Only claimant can claim their rewards
Or:
- Error should be raised
Or:
- RAM ownership should be re-thought
Additional context
Problematic line is this:
|
accounts.emplace(claimant, [&](auto& col) { |
Describe the bug
Currently anyone can help anyone by claiming their worker rewards. This is a good feature, and is a good smart contract design convention (do not place unneeded restrains).
However, if the account is a new one, claiming would not be successful, since it tries to use claimant's RAM, which is not available if the action caller is not claimant.
Expected behavior
Either:
Or:
Or:
Additional context
Problematic line is this:
telos-decide/contracts/decide/src/worker.cpp
Line 152 in b17261e