-
Notifications
You must be signed in to change notification settings - Fork 57
Description
1. Expected behavior and actual behavior.
UInt64
class does not allow operating with the value. To start, we could support add() and subtract() capabilities.
2. Steps to reproduce the problem (example)
Catapult transactions can be rolled back up to a certain amount of blocks. We say that every time there is a new block, the transaction receives a confirmation. The more confirmation transaction has, the fewer chances this is rolled-back.
To determine if we can consider a transaction as persistent, we need to compare the current blockchain height with the transaction blockchain height. Then, determine if the difference is higher than a certain number we consider good enough to consider the transactions as confirmed. This can be calculated as:
isTransactionPersistent = (currentBlockchainHeight - transactionHeight >= (confirmationsToConsiderTransacitionPersistent);`
Note that right now, it is only possible to do (currentBlockchainHeight - transactionHeight)
if the height is small enough and does not overflow when calling height.compact()
.