Skip to content

Commit 27a3d3a

Browse files
build(deps): bump blinklabs-io/gouroboros and blinklabs-io/adder (#427)
* build(deps): bump github.com/blinklabs-io/gouroboros Bumps [github.com/blinklabs-io/gouroboros](https://github.com/blinklabs-io/gouroboros) from 0.125.1 to 0.127.0. - [Release notes](https://github.com/blinklabs-io/gouroboros/releases) - [Commits](blinklabs-io/gouroboros@v0.125.1...v0.127.0) --- updated-dependencies: - dependency-name: github.com/blinklabs-io/gouroboros dependency-version: 0.127.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * chore(deps): update blinklabs-io/adder to 0.30.4 Signed-off-by: Chris Gianelloni <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Chris Gianelloni <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Chris Gianelloni <[email protected]>
1 parent 02208f8 commit 27a3d3a

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require (
88
connectrpc.com/connect v1.18.1
99
connectrpc.com/grpchealth v1.4.0
1010
connectrpc.com/grpcreflect v1.3.0
11-
github.com/blinklabs-io/adder v0.30.3
12-
github.com/blinklabs-io/gouroboros v0.125.1
11+
github.com/blinklabs-io/adder v0.30.4
12+
github.com/blinklabs-io/gouroboros v0.127.0
1313
github.com/blinklabs-io/tx-submit-api v0.20.8
1414
github.com/gin-gonic/gin v1.10.1
1515
github.com/gorilla/websocket v1.5.3

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
1919
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
2020
github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5MS5JVb4c=
2121
github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
22-
github.com/blinklabs-io/adder v0.30.3 h1:ITfwGxwMxpS/+MtmbAwe1yEPJjGHu+1Q63fMigxF57U=
23-
github.com/blinklabs-io/adder v0.30.3/go.mod h1:Ys8Zy7PWdqME76Xg3EQZmf9HOgGRi/c2UiyqTunSmhw=
24-
github.com/blinklabs-io/gouroboros v0.125.1 h1:ZhKgKvFEcz8OtGxGrEYh8A03nqS7+QWqDE+/sGKNKdA=
25-
github.com/blinklabs-io/gouroboros v0.125.1/go.mod h1:LUGnvJ1iOmpCihNxT9fyZFf6KD5E45sV8ZqEUgljzDw=
22+
github.com/blinklabs-io/adder v0.30.4 h1:bFBGAdCQNf/u/1JMyEELpE7ccuaBzfrKNpnNIC3SL2U=
23+
github.com/blinklabs-io/adder v0.30.4/go.mod h1:Qxz3yIXR6Kl+1QqQ5U+Rz6lWxmk8RNfZDB6f5oUhP0E=
24+
github.com/blinklabs-io/gouroboros v0.127.0 h1:Zy+ZIMizxjL90WqexO5x0FFW8W7Nla/p45IS56xY/zw=
25+
github.com/blinklabs-io/gouroboros v0.127.0/go.mod h1:LUGnvJ1iOmpCihNxT9fyZFf6KD5E45sV8ZqEUgljzDw=
2626
github.com/blinklabs-io/ouroboros-mock v0.3.8 h1:+DAt2rx0ouZUxee5DBMgZq3I1+ZdxFSHG9g3tYl/FKU=
2727
github.com/blinklabs-io/ouroboros-mock v0.3.8/go.mod h1:UwQIf4KqZwO13P9d90fbi3UL/X7JaJfeEbqk+bEeFQA=
2828
github.com/blinklabs-io/tx-submit-api v0.20.8 h1:SYe5jviJ2LCqICdKeSvY29IL0d00iwUytM54P/GBCUk=

internal/utxorpc/query.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ func (s *queryServiceServer) ReadParams(
6868
}
6969

7070
// Set up response parameters
71+
tmpPparams, err := protoParams.Utxorpc()
72+
if err != nil {
73+
return nil, fmt.Errorf("convert pparams: %w", err)
74+
}
7175
acpc := &query.AnyChainParams_Cardano{
72-
Cardano: protoParams.Utxorpc(),
76+
Cardano: tmpPparams,
7377
}
7478

7579
resp.LedgerTip = &query.ChainPoint{

internal/utxorpc/submit.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,10 @@ func (s *submitServiceServer) WatchMempool(
315315
if err != nil {
316316
return err
317317
}
318-
cTx := tx.Utxorpc() // *cardano.Tx
318+
cTx, err := tx.Utxorpc() // *cardano.Tx
319+
if err != nil {
320+
return fmt.Errorf("convert transaction: %w", err)
321+
}
319322
resp := &submit.WatchMempoolResponse{}
320323
record := &submit.TxInMempool{
321324
NativeBytes: txRawBytes,

internal/utxorpc/sync.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,13 @@ func (s *chainSyncServiceServer) FollowTip(
246246
block := be.Block // gOuroboros Block
247247

248248
var acb sync.AnyChainBlock
249-
var acbc sync.AnyChainBlock_Cardano
250-
acbc.Cardano = block.Utxorpc()
249+
tmpBlock, err := block.Utxorpc()
250+
if err != nil {
251+
return fmt.Errorf("convert block: %w", err)
252+
}
253+
acbc := sync.AnyChainBlock_Cardano{
254+
Cardano: tmpBlock,
255+
}
251256
acb.Chain = &acbc
252257
var ftra sync.FollowTipResponse_Apply
253258
ftra.Apply = &acb

internal/utxorpc/watch.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,15 @@ func (s *watchServiceServer) WatchTx(
113113

114114
// Loop through transactions
115115
for _, tx := range block.Transactions() {
116+
tmpTx, err := tx.Utxorpc()
117+
if err != nil {
118+
return fmt.Errorf("convert transaction: %w", err)
119+
}
116120
resp := &watch.WatchTxResponse{}
117121
var act watch.AnyChainTx
118-
var actc watch.AnyChainTx_Cardano
119-
cTx := tx.Utxorpc() // *cardano.Tx
120-
actc.Cardano = cTx
122+
actc := watch.AnyChainTx_Cardano{
123+
Cardano: tmpTx,
124+
}
121125
act.Chain = &actc
122126
var wtra watch.WatchTxResponse_Apply
123127
wtra.Apply = &act

0 commit comments

Comments
 (0)