Skip to content

Commit

Permalink
update github.com/chainbound/fiber-go to v1.9.0 (#37)
Browse files Browse the repository at this point in the history
## πŸ“ Summary

Update to latest https://github.com/chainbound/fiber-go

---

## βœ… I have run these commands

* [x] `make lint`
* [x] `make test`
* [x] `go mod tidy`
  • Loading branch information
metachris authored Mar 14, 2024
1 parent 94065de commit e59bf71
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 36 deletions.
9 changes: 4 additions & 5 deletions collector/node_conn_chainbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type ChainboundNodeConnection struct {
apiKey string
url string
srcTag string
fiberC chan *fiber.Transaction
fiberC chan *fiber.TransactionWithSender
txC chan TxIn
backoffSec int
}
Expand All @@ -46,20 +46,19 @@ func NewChainboundNodeConnection(opts ChainboundNodeOpts) *ChainboundNodeConnect
apiKey: opts.APIKey,
url: url,
srcTag: srcTag,
fiberC: make(chan *fiber.Transaction),
fiberC: make(chan *fiber.TransactionWithSender),
txC: opts.TxC,
backoffSec: initialBackoffSec,
}
}

func (cbc *ChainboundNodeConnection) Start() {
cbc.log.Debug("chainbound stream starting...")
cbc.fiberC = make(chan *fiber.Transaction)
cbc.fiberC = make(chan *fiber.TransactionWithSender)
go cbc.connect()

for fiberTx := range cbc.fiberC {
nativeTx := fiberTx.ToNative()
cbc.txC <- TxIn{time.Now().UTC(), nativeTx, cbc.srcTag}
cbc.txC <- TxIn{time.Now().UTC(), fiberTx.Transaction, cbc.srcTag}
}

cbc.log.Error("chainbound stream closed")
Expand Down
31 changes: 21 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/HdrHistogram/hdrhistogram-go v1.1.2
github.com/NYTimes/gziphandler v1.1.1
github.com/bloXroute-Labs/gateway/v2 v2.127.42
github.com/chainbound/fiber-go v1.7.2
github.com/chainbound/fiber-go v1.9.0
github.com/dustin/go-humanize v1.0.1
github.com/eden-network/mempool-service v1.0.1
github.com/ethereum/go-ethereum v1.13.14
Expand All @@ -22,7 +22,7 @@ require (
go.uber.org/atomic v1.11.0
go.uber.org/zap v1.25.0
golang.org/x/text v0.14.0
google.golang.org/grpc v1.59.0
google.golang.org/grpc v1.62.1
)

require (
Expand All @@ -31,6 +31,7 @@ require (
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/apache/arrow/go/arrow v0.0.0-20200730104253-651201b0f516 // indirect
github.com/apache/thrift v0.14.2 // indirect
github.com/attestantio/go-eth2-client v0.19.10 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
Expand All @@ -49,25 +50,33 @@ require (
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/goccy/go-yaml v1.11.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/onsi/gomega v1.27.4 // indirect
github.com/pierrec/lz4/v4 v4.1.8 // indirect
Expand All @@ -77,8 +86,9 @@ require (
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/supranational/blst v0.3.11 // indirect
Expand All @@ -93,13 +103,14 @@ require (
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/protobuf v1.31.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading

0 comments on commit e59bf71

Please sign in to comment.