From 3ddd8927029e0293c805df3c7e9dac18356b24c9 Mon Sep 17 00:00:00 2001 From: David Case Date: Wed, 6 Nov 2024 15:54:07 -0500 Subject: [PATCH] default to http.DefaultClient --- transaction/broadcaster/arc.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transaction/broadcaster/arc.go b/transaction/broadcaster/arc.go index 72876f6..137c3f8 100644 --- a/transaction/broadcaster/arc.go +++ b/transaction/broadcaster/arc.go @@ -130,6 +130,9 @@ func (a *Arc) Broadcast(t *transaction.Transaction) (*transaction.BroadcastSucce req.Header.Set("X-WaitFor", string(a.WaitFor)) } + if a.Client == nil { + a.Client = http.DefaultClient + } resp, err := a.Client.Do(req) if err != nil { return nil, &transaction.BroadcastFailure{