erigon-pulse/cmd/devnet/commands/event.go
Leonard Chinonso 805230ba63
Setup web socket endpoints to listen for new transactions after sending (#5940)
- Added listening methods for WebSocket subscriptions 
- Listened for new blocks using the newHeads method to determine when to
look for a transaction
- Added new util methods and tests for them
- Simplified communication to the user upon initiating the devnet tool
2022-11-03 09:45:36 +07:00

17 lines
304 B
Go

package commands
import (
"fmt"
"github.com/ledgerwatch/erigon/cmd/devnet/services"
"github.com/ledgerwatch/erigon/common"
)
func callSubscribeToNewHeads(hash common.Hash) {
_, err := services.SearchBlockForTransactionHash(hash)
if err != nil {
fmt.Printf("FAILURE => %v\n", err)
return
}
}