Skip to content

Commit cddb143

Browse files
committed
Improved logs and descriptions
1 parent c0d6f92 commit cddb143

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Diff for: pkg/tbtc/chain.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ type DKGParameters struct {
235235
ApprovePrecedencePeriodBlocks uint64
236236
}
237237

238-
// WalletClosedEvent represents a wallet closed. It is emitted when the wallet
239-
// is closed in the wallet registry.
238+
// WalletClosedEvent represents a wallet closed event. It is emitted when the
239+
// wallet is closed in the wallet registry.
240240
type WalletClosedEvent struct {
241241
WalletID [32]byte
242242
BlockNumber uint64

Diff for: pkg/tbtc/deduplicator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const (
1616
// DKGResultHashCachePeriod is the time period the cache maintains
1717
// the given DKG result hash.
1818
DKGResultHashCachePeriod = 7 * 24 * time.Hour
19-
// WalletClosedCachePeriod is the time period the cache maintains
20-
// the given wallet closed hash.
19+
// WalletClosedCachePeriod is the time period the cache maintains the ID of
20+
// a closed wallet.
2121
WalletClosedCachePeriod = 7 * 24 * time.Hour
2222
)
2323

Diff for: pkg/tbtc/tbtc.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -270,16 +270,17 @@ func Initialize(
270270
event.WalletID,
271271
); !ok {
272272
logger.Warnf(
273-
"Wallet closure for wallet with ID [0x%x] at block [%v] has"+
274-
"been already processed",
273+
"Wallet closure for wallet with ID [0x%x] at block [%v] "+
274+
"has been already processed",
275275
event.WalletID,
276276
event.BlockNumber,
277277
)
278278
return
279279
}
280280

281281
logger.Infof(
282-
"Wallet with ID [0x%x] has been closed at block [%v]",
282+
"Wallet with ID [0x%x] has been closed at block [%v]; "+
283+
"proceeding with handling wallet closure",
283284
event.WalletID,
284285
event.BlockNumber,
285286
)
@@ -289,7 +290,7 @@ func Initialize(
289290
)
290291
if err != nil {
291292
logger.Errorf(
292-
"Failure while handling wallet with ID [0x%x]: [%v]",
293+
"Failure while handling wallet closure with ID [0x%x]: [%v]",
293294
event.WalletID,
294295
err,
295296
)

0 commit comments

Comments
 (0)