Skip to content

Commit

Permalink
Improved logs and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Jun 10, 2024
1 parent c0d6f92 commit 655f899
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pkg/tbtc/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ type DKGParameters struct {
ApprovePrecedencePeriodBlocks uint64
}

// WalletClosedEvent represents a wallet closed. It is emitted when the wallet
// is closed in the wallet registry.
// WalletClosedEvent represents a wallet closed event. It is emitted when the
// wallet is closed in the wallet registry.
type WalletClosedEvent struct {
WalletID [32]byte
BlockNumber uint64
Expand Down
4 changes: 2 additions & 2 deletions pkg/tbtc/deduplicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const (
// DKGResultHashCachePeriod is the time period the cache maintains
// the given DKG result hash.
DKGResultHashCachePeriod = 7 * 24 * time.Hour
// WalletClosedCachePeriod is the time period the cache maintains
// the given wallet closed hash.
// WalletClosedCachePeriod is the time period the cache maintains the ID of
// a closed wallet.
WalletClosedCachePeriod = 7 * 24 * time.Hour
)

Expand Down
5 changes: 3 additions & 2 deletions pkg/tbtc/tbtc.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ func Initialize(
}

logger.Infof(
"Wallet with ID [0x%x] has been closed at block [%v]",
"Wallet with ID [0x%x] has been closed at block [%v]; "+
"proceeding with handling wallet closure",
event.WalletID,
event.BlockNumber,
)
Expand All @@ -289,7 +290,7 @@ func Initialize(
)
if err != nil {
logger.Errorf(
"Failure while handling wallet with ID [0x%x]: [%v]",
"Failure while handling wallet closure with ID [0x%x]: [%v]",
event.WalletID,
err,
)
Expand Down

0 comments on commit 655f899

Please sign in to comment.