From a5e2273ff58be90aeb2dd0749d5181d8c3c3f9bd Mon Sep 17 00:00:00 2001 From: sojinkim-icon <41354736+sojinkim-icon@users.noreply.github.com> Date: Tue, 21 May 2019 18:30:06 +0900 Subject: [PATCH] Update audit-checklist.md removing the temporary limitation item caused by the ArrayDB bug. resolved after updating mainnet to iconservice 1.2.3 --- score/audit-checklist.md | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/score/audit-checklist.md b/score/audit-checklist.md index 934a448..6036270 100644 --- a/score/audit-checklist.md +++ b/score/audit-checklist.md @@ -454,30 +454,7 @@ def __init__(self, db: IconScoreDatabase) -> None: ``` ### Temporary Limitation -Due to the known issue of ArrayDB, declaring ArrayDB as a class member variable in __init__() may not work as intended. Following workaround is needed. ArrayDB instance must be initialized every time it is used. - -```python -# Problematic (Original Usage) -def __init__(self, db: IconScoreDatabase) -> None: - super().__init__(db) - self.test_array = ArrayDB('test_array', db, value_type=int) - -def func(self) -> None: - self.test_array.put(0) - - -# Good (Temporary) -@property -def test_array(self) -> ArrayDB: - return ArrayDB('test_array', db, value_type=int) - -def __init__(self, db: IconScoreDatabase) -> None: - super().__init__(db) - # no declaration - -def func(self) -> None: - self.test_array.put(0) -``` +N/A ## Warning