File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change 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
99100func (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
You can’t perform that action at this time.
0 commit comments