[#1452] TX Resubmission-the wallet has to periodically resubmit unmined transactions (#1454)

- State machine puml and png files updated
- Order of transaction removed because it has no effect
This commit is contained in:
Lukas Korba 2024-07-03 13:34:14 +02:00
parent 09028c38b3
commit 25582fecef
4 changed files with 9 additions and 4 deletions

View File

@ -34,7 +34,7 @@ extension TxResubmissionAction: Action {
do {
logger.info("TxResubmissionAction check started at \(latestBlockHeight) height.")
let transactions = try await transactionRepository.findForResubmission(upTo: latestBlockHeight)
// no candidates, update the time and continue with the next action
if transactions.isEmpty {
latestResolvedTime = Date().timeIntervalSince1970

View File

@ -110,7 +110,6 @@ class TransactionSQLDAO: TransactionRepository {
func findForResubmission(upTo: BlockHeight) async throws -> [ZcashTransaction.Overview] {
let query = transactionsView
.order((ZcashTransaction.Overview.Column.minedHeight ?? BlockHeight.max).desc)
.filter(
ZcashTransaction.Overview.Column.minedHeight == nil &&
ZcashTransaction.Overview.Column.expiryHeight > upTo

View File

@ -26,7 +26,13 @@ updateChainTip -[#green,bold]-> download : Processing of scan range continues
processSuggestedScanRanges : ProcessSuggestedScanRangesAction
processSuggestedScanRanges -[#green,bold]-> download : Scan range available to process
processSuggestedScanRanges -[#green,bold]-> finished : Scan ranges FULLY processed
processSuggestedScanRanges -[#green,bold]-> txResubmissionA : Scan ranges FULLY processed
txResubmissionA : TxResubmissionAction
txResubmissionA -[#green,bold]-> finished
txResubmissionB : TxResubmissionAction
txResubmissionB -[#green,bold]-> updateChainTip
download : DownloadAction
download -[#green,bold]-> scan
@ -42,7 +48,7 @@ clearAlreadyScannedBlocks : ClearAlreadyScannedBlocksAction
clearAlreadyScannedBlocks -[#green,bold]-> enhance
enhance : EnhanceAction
enhance -[#green,bold]-> updateChainTip : Range NOT finished
enhance -[#green,bold]-> txResubmissionB : Range NOT finished
enhance -[#green,bold]-> clearCache : Range finished, clear cache and check the scan ranges
note right of enhance

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 87 KiB