Skip to content

Commit 19836c9

Browse files
committed
chore(deps): update blinklabs-io/adder to 0.30.4
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 1f3543a commit 19836c9

File tree

6 files changed

+26
-10
lines changed

6 files changed

+26
-10
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ 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
11+
github.com/blinklabs-io/adder v0.30.4
1212
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

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ 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=
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=
2424
github.com/blinklabs-io/gouroboros v0.127.0 h1:Zy+ZIMizxjL90WqexO5x0FFW8W7Nla/p45IS56xY/zw=
2525
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=

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)