Skip to content

Commit

Permalink
Added new logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Mar 15, 2024
1 parent cbd5bf8 commit 76f0f43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions pkg/maintainer/spv/moved_funds_sweep.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,23 @@ func getUnprovenMovedFundsSweepTransactions(
wallet.State != tbtc.StateMovingFunds {
// The wallet can only submit moved funds sweep proof if it's `Live`
// or `MovingFunds`. If the state is different skip it.
logger.Infof(
"skipped proving moved funds sweep transactions for wallet [%x] "+
"because of wallet state [%v]",
walletPublicKeyHash,
wallet.State,
)
continue
}

if wallet.PendingMovedFundsSweepRequestsCount == 0 {
// If the wallet does not have any pending moved funds sweep
// requests skip it.
logger.Infof(
"skipped proving moved funds sweep transactions for wallet [%x] "+
"because it has no pending moved funds sweep requests",
walletPublicKeyHash,
)
continue
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/maintainer/spv/moved_funds_sweep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ func TestGetUnprovenMovedFundsSweepTransactions(t *testing.T) {
}

// The order of returned transaction hashes is random. Sort them before
// comapring.
// comparing.
sort.Slice(transactionsHashes, func(i, j int) bool {
return transactionsHashes[i].String() < transactionsHashes[j].String()
})
Expand Down

0 comments on commit 76f0f43

Please sign in to comment.