Skip to content

Commit 947b39e

Browse files
committed
add verbose to arc broadcastor
1 parent 203fd0e commit 947b39e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

go.mod

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ require (
99
golang.org/x/sync v0.6.0
1010
)
1111

12-
require github.com/stretchr/objx v0.5.2 // indirect
13-
1412
require (
1513
github.com/pkg/errors v0.9.1
1614
github.com/pmezard/go-difflib v1.0.0 // indirect

go.sum

-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
44
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
8-
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
9-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
10-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
117
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
128
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
139
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=

transaction/broadcaster/arc.go

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"errors"
99
"fmt"
1010
"io"
11+
"log"
1112
"net/http"
1213
"time"
1314

@@ -43,6 +44,7 @@ type Arc struct {
4344
WaitForStatus string
4445
WaitFor ArcStatus
4546
Client HTTPClient // Added for testing
47+
Verbose bool
4648
}
4749

4850
type ArcResponse struct {
@@ -165,6 +167,9 @@ func (a *Arc) Broadcast(t *transaction.Transaction) (*transaction.BroadcastSucce
165167
}
166168

167169
response := &ArcResponse{}
170+
if a.Verbose {
171+
log.Println("msg", string(msg))
172+
}
168173
err = json.Unmarshal(msg, &response)
169174
if err != nil {
170175
return nil, &transaction.BroadcastFailure{

0 commit comments

Comments
 (0)