From e5bec42474faa2ba8889c7d7029e260f60747487 Mon Sep 17 00:00:00 2001 From: jkrvivian Date: Wed, 24 Apr 2024 14:36:46 +0800 Subject: [PATCH] Improve log messages --- pkg/spammer/spammer.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/spammer/spammer.go b/pkg/spammer/spammer.go index 158264f..057986e 100644 --- a/pkg/spammer/spammer.go +++ b/pkg/spammer/spammer.go @@ -243,7 +243,7 @@ func (s *Spammer) PrepareBlock(ctx context.Context, issuanceData *models.Payload } block, err := s.EvilWallet.CreateBlock(ctx, clt, issuanceData.Payload, issuerAccount, strongParents...) if err != nil { - //s.logError(ierrors.Wrap(err, ErrFailPostBlock.Error())) + s.LogDebugf("failed at PrepareBlock: %v", ierrors.Wrap(err, ErrFailPostBlock.Error())) s.ErrCounter.CountError(ierrors.Wrap(err, ErrFailPostBlock.Error())) return nil @@ -287,8 +287,7 @@ func (s *Spammer) PrepareAndPostBlock(ctx context.Context, issuanceData *models. } if err != nil { - // for the conflicting spams we will see errors and that's fine, so that's why we are not printing - s.LogDebugf("error: %v", ierrors.Wrap(err, ErrFailPostBlock.Error())) + // for the conflicting spams we will see errors and that's fine, so that's why we are not printing them s.ErrCounter.CountError(ierrors.Wrap(err, ErrFailPostBlock.Error())) return iotago.EmptyBlockID