Add memory cleaning to the BitcoinAgent
#14
Labels
discussion
The task has to be more precisely scoped or the task is waiting details.
enhancement
New feature or request
epic
A task that is going to take more than a day to complete.
high priority
Issue disabling the user to use a feature correctly.
ecdsa_pub_key_addresses
andutxos_state_addresses
of theBitcoinAgent
are already manageable withadd_address_with_parameters
,add_address
,remove_address
andlist_addresses
.However for caches required for transfer,
update_transaction
andtransaction_status
, we need some functions to clean them. The canister developer can already by usingget_state
andfrom_state
modify them but we want to provide a clean way to do this. We could for instance propose a function cleaning caches entries older than a given number of confirmations.Even if there will already be some auto-cleanup, for instance let say we have a cache with the time when we sent a transaction to support
transaction_status
. Once the transaction was confirmed in a block, then we can remove it from this cache because we don’t anymore have to check for time out.We have to take care when cleaning not to invalidate assumptions that we do when manipulating these caches otherwise the
BitcoinAgent
's memory would end up corrupted.Related to #5, #6 and #13.
The text was updated successfully, but these errors were encountered: