Skip to content

Commit 935da54

Browse files
authored
Revert "Np/debug (#265)" (#266)
This reverts commit 6deb80f.
1 parent 6deb80f commit 935da54

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

internal/publisher/publisher.go

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"crypto/tls"
66
"encoding/json"
77
"fmt"
8+
"math/rand/v2"
89
"net"
910
"strings"
1011
"sync"
@@ -97,18 +98,9 @@ func (p *Publisher) initialize() error {
9798
}
9899

99100
func (p *Publisher) PublishBlockData(blockData []common.BlockData) error {
100-
for _, data := range blockData {
101-
for _, tx := range data.Transactions {
102-
if strings.ToLower(tx.ToAddress) == "0x9c868614ffca7da36b36330b1f317b117c7834de" {
103-
log.Debug().Msgf("Publising block has txn hash %s", tx.Hash)
104-
}
105-
}
101+
if rand.Float32() < 0.3 {
102+
log.Debug().Msgf("Publishing %d block data", len(blockData))
106103
}
107-
log.Debug().
108-
Any("startBlockNumber", blockData[0].Block.Number.Uint64()).
109-
Any("endBlockNumber", blockData[len(blockData)-1].Block.Number.Uint64()).
110-
Msgf("Publishing %d block data", len(blockData))
111-
112104
return p.publishBlockData(blockData, false)
113105
}
114106

0 commit comments

Comments
 (0)