Skip to content

Commit 8dab78b

Browse files
authored
chore(deps): gouroboros 0.138.0 (#992)
Signed-off-by: Chris Gianelloni <wolf31o2@blinklabs.io>
1 parent 918d38b commit 8dab78b

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

database/plugin/metadata/sqlite/pool.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ import (
2626

2727
// GetPool gets a pool
2828
func (d *MetadataStoreSqlite) GetPool(
29-
// pkh lcommon.PoolKeyHash,
30-
pkh []byte,
29+
pkh lcommon.PoolKeyHash,
3130
txn *gorm.DB,
3231
) (*models.Pool, error) {
3332
ret := &models.Pool{}
@@ -42,7 +41,7 @@ func (d *MetadataStoreSqlite) GetPool(
4241
First(
4342
ret,
4443
"pool_key_hash = ?",
45-
pkh,
44+
pkh.Bytes(),
4645
)
4746
if result.Error != nil {
4847
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
@@ -147,7 +146,7 @@ func (d *MetadataStoreSqlite) SetPoolRegistration(
147146
if txn == nil {
148147
txn = d.DB()
149148
}
150-
tmpPool, err := d.GetPool(cert.Operator[:], txn)
149+
tmpPool, err := d.GetPool(lcommon.PoolKeyHash(cert.Operator[:]), txn)
151150
if err != nil {
152151
if !errors.Is(err, models.ErrPoolNotFound) {
153152
return err
@@ -220,7 +219,7 @@ func (d *MetadataStoreSqlite) SetPoolRetirement(
220219
if txn == nil {
221220
txn = d.DB()
222221
}
223-
tmpPool, err := d.GetPool(cert.PoolKeyHash[:], txn)
222+
tmpPool, err := d.GetPool(lcommon.PoolKeyHash(cert.PoolKeyHash[:]), txn)
224223
if err != nil {
225224
return err
226225
}

database/plugin/metadata/store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type MetadataStore interface {
4545
*gorm.DB,
4646
) ([]lcommon.PoolRegistrationCertificate, error)
4747
GetPool(
48-
[]byte, // pool key hash
48+
lcommon.PoolKeyHash,
4949
*gorm.DB,
5050
) (*models.Pool, error)
5151
GetStakeRegistrations(

database/pool.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ package database
1616

1717
import (
1818
"github.com/blinklabs-io/dingo/database/models"
19+
lcommon "github.com/blinklabs-io/gouroboros/ledger/common"
1920
)
2021

2122
// GetPool returns a pool by its key hash
2223
func (d *Database) GetPool(
23-
pkh []byte,
24+
pkh lcommon.PoolKeyHash,
2425
txn *Txn,
2526
) (*models.Pool, error) {
2627
if txn == nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
connectrpc.com/connect v1.19.1
1010
connectrpc.com/grpchealth v1.4.0
1111
connectrpc.com/grpcreflect v1.3.0
12-
github.com/blinklabs-io/gouroboros v0.137.1
12+
github.com/blinklabs-io/gouroboros v0.138.0
1313
github.com/blinklabs-io/ouroboros-mock v0.3.9
1414
github.com/blinklabs-io/plutigo v0.0.13
1515
github.com/dgraph-io/badger/v4 v4.8.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3M
122122
github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
123123
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
124124
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
125-
github.com/blinklabs-io/gouroboros v0.137.1 h1:4d3Yp50i53JiBUmpCDQQ98Wh2PsBm3HfcV/axjK789U=
126-
github.com/blinklabs-io/gouroboros v0.137.1/go.mod h1:6Gnhu76jzCE0p7zHmQn7TjP8t2MMghF711LgxiuLelg=
125+
github.com/blinklabs-io/gouroboros v0.138.0 h1:yQF18YmC/hOz6g0/z/SdwsLB1bHD8019wQRQPwabUck=
126+
github.com/blinklabs-io/gouroboros v0.138.0/go.mod h1:xwDWF3wRp/9l7uZ6DLfy/OFGdO4GjKomsWmv9i3le6s=
127127
github.com/blinklabs-io/ouroboros-mock v0.3.9 h1:UnciDccJ5tZCR1xI0BcxGZcYjJ/PS5MpnjiiGtrZ680=
128128
github.com/blinklabs-io/ouroboros-mock v0.3.9/go.mod h1:uTkE8/LAYL7yQSntH48Pudf5Xn+jaBWMj+9udbzYXhI=
129129
github.com/blinklabs-io/plutigo v0.0.13 h1:JztPigFmknQmQ3Ti1+mdTY96ihOUDh6wJ3pPnN2YYBU=

ledger/view.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func (lv *LedgerView) StakeRegistration(
8080
// It returns the most recent active pool registration certificate
8181
// and the epoch of any pending retirement for the given pool key hash.
8282
func (lv *LedgerView) PoolCurrentState(
83-
pkh []byte,
83+
pkh lcommon.PoolKeyHash,
8484
) (*lcommon.PoolRegistrationCertificate, *uint64, error) {
8585
pool, err := lv.ls.db.GetPool(pkh, lv.txn)
8686
if err != nil {

0 commit comments

Comments
 (0)