chore: add send tx example

This commit is contained in:
2025-12-26 12:03:05 +08:00
parent 99010ca601
commit 32be177f90
4 changed files with 100 additions and 4 deletions

View File

@@ -43,8 +43,6 @@ func main() {
}
defer cleanup()
txCh := make(chan types.TxSignalBatch, 1000)
exitSignal := make(chan os.Signal, 1)
ctx, cancel := context.WithCancel(context.Background())
signal.Notify(exitSignal, syscall.SIGINT, syscall.SIGTERM)
@@ -55,6 +53,7 @@ func main() {
}()
// async read from shreder
txCh := make(chan types.TxSignalBatch, 1000)
go func() {
err := shrederClient.ReadSync(ctx, txCh)
if err != nil {