From 655f899a27e2f7e4530e19ed937cc48f780aeb13 Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Mon, 10 Jun 2024 10:42:22 +0200 Subject: [PATCH] Improved logs and descriptions --- pkg/tbtc/chain.go | 4 ++-- pkg/tbtc/deduplicator.go | 4 ++-- pkg/tbtc/tbtc.go | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkg/tbtc/chain.go b/pkg/tbtc/chain.go index d8bfec302e..ad030b5bae 100644 --- a/pkg/tbtc/chain.go +++ b/pkg/tbtc/chain.go @@ -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 diff --git a/pkg/tbtc/deduplicator.go b/pkg/tbtc/deduplicator.go index be16d990d0..37d0b1704f 100644 --- a/pkg/tbtc/deduplicator.go +++ b/pkg/tbtc/deduplicator.go @@ -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 ) diff --git a/pkg/tbtc/tbtc.go b/pkg/tbtc/tbtc.go index a341bf24f0..ab0939d6f7 100644 --- a/pkg/tbtc/tbtc.go +++ b/pkg/tbtc/tbtc.go @@ -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, ) @@ -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, )