File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 5
5
"crypto/tls"
6
6
"encoding/json"
7
7
"fmt"
8
- "math/rand/v2"
9
8
"net"
10
9
"strings"
11
10
"sync"
@@ -98,9 +97,18 @@ func (p *Publisher) initialize() error {
98
97
}
99
98
100
99
func (p * Publisher ) PublishBlockData (blockData []common.BlockData ) error {
101
- if rand .Float32 () < 0.3 {
102
- log .Debug ().Msgf ("Publishing %d block data" , len (blockData ))
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
+ }
103
106
}
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
+
104
112
return p .publishBlockData (blockData , false )
105
113
}
106
114
You can’t perform that action at this time.
0 commit comments