Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions blockfetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ func (n *Node) blockfetchClientConnOpts() []blockfetch.BlockFetchOptionFunc {
blockfetch.WithBatchDoneFunc(n.blockfetchClientBatchDone),
blockfetch.WithBatchStartTimeout(2 * time.Second),
blockfetch.WithBlockTimeout(2 * time.Second),
// Set the recv queue size to 2x our block batch size
blockfetch.WithRecvQueueSize(1000),
}
}

Expand Down
4 changes: 3 additions & 1 deletion database/plugin/blob/aws/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ func New(
const prefix = "s3://"
if !strings.HasPrefix(strings.ToLower(dataDir), prefix) {
cancel()
return nil, errors.New("s3 blob: expected dataDir='s3://<bucket>[/prefix]'")
return nil, errors.New(
"s3 blob: expected dataDir='s3://<bucket>[/prefix]'",
)
}

path := strings.TrimPrefix(strings.ToLower(dataDir), prefix)
Expand Down
4 changes: 2 additions & 2 deletions database/plugin/metadata/sqlite/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ func (d *MetadataStoreSqlite) SetStakeRegistrationDelegation(
pkh := cert.PoolKeyHash
tmpItem := models.StakeRegistrationDelegation{
StakingKey: stakeKey,
PoolKeyHash: pkh,
PoolKeyHash: pkh[:],
AddedSlot: slot,
DepositAmount: deposit,
}
if err := d.SetAccount(stakeKey, pkh, nil, slot, true, txn); err != nil {
if err := d.SetAccount(stakeKey, pkh[:], nil, slot, true, txn); err != nil {
return err
}
if txn != nil {
Expand Down
2 changes: 1 addition & 1 deletion database/plugin/metadata/sqlite/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (d *MetadataStoreSqlite) GetStakeRegistrations(
var tmpCert lcommon.StakeRegistrationCertificate
for _, cert := range certs {
tmpCert = lcommon.StakeRegistrationCertificate{
CertType: lcommon.CertificateTypeStakeRegistration,
CertType: uint(lcommon.CertificateTypeStakeRegistration),
StakeCredential: lcommon.Credential{
// TODO: determine correct type
// CredType: lcommon.CredentialTypeAddrKeyHash,
Expand Down
2 changes: 1 addition & 1 deletion database/plugin/metadata/sqlite/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (d *MetadataStoreSqlite) GetPoolRegistrations(
for _, cert := range certs {
tmpMargin = lcommon.GenesisRat{Rat: cert.Margin.Rat}
tmpCert = lcommon.PoolRegistrationCertificate{
CertType: lcommon.CertificateTypePoolRegistration,
CertType: uint(lcommon.CertificateTypePoolRegistration),
Operator: lcommon.PoolKeyHash(
lcommon.NewBlake2b224(cert.PoolKeyHash),
),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ require (
connectrpc.com/grpcreflect v1.3.0
github.com/aws/aws-sdk-go-v2/config v1.31.11
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.3
github.com/blinklabs-io/gouroboros v0.139.0
github.com/blinklabs-io/gouroboros v0.140.0
github.com/blinklabs-io/ouroboros-mock v0.3.9
github.com/blinklabs-io/plutigo v0.0.13
github.com/btcsuite/btcd/btcutil v1.1.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3M
github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/blinklabs-io/gouroboros v0.139.0 h1:ctoHFEuXhJlMcUC1fe5x6IX1tqZnS/BAaBDeHiXskeU=
github.com/blinklabs-io/gouroboros v0.139.0/go.mod h1:FxKQNNNRQN5F/Cl4pnW7SHhpPo7fD57mTPGo4N9ulnY=
github.com/blinklabs-io/gouroboros v0.140.0 h1:dFK2iunkTflCI2hlDSGZJJ7JerYhpdE41HnBUVvjj9E=
github.com/blinklabs-io/gouroboros v0.140.0/go.mod h1:FxKQNNNRQN5F/Cl4pnW7SHhpPo7fD57mTPGo4N9ulnY=
github.com/blinklabs-io/ouroboros-mock v0.3.9 h1:UnciDccJ5tZCR1xI0BcxGZcYjJ/PS5MpnjiiGtrZ680=
github.com/blinklabs-io/ouroboros-mock v0.3.9/go.mod h1:uTkE8/LAYL7yQSntH48Pudf5Xn+jaBWMj+9udbzYXhI=
github.com/blinklabs-io/plutigo v0.0.13 h1:JztPigFmknQmQ3Ti1+mdTY96ihOUDh6wJ3pPnN2YYBU=
Expand Down
2 changes: 1 addition & 1 deletion ledger/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (lv *LedgerView) PoolCurrentState(
}
reg := pool.Registration[latestIdx]
tmp := lcommon.PoolRegistrationCertificate{
CertType: lcommon.CertificateTypePoolRegistration,
CertType: uint(lcommon.CertificateTypePoolRegistration),
Operator: lcommon.PoolKeyHash(
lcommon.NewBlake2b224(pool.PoolKeyHash),
),
Expand Down
Loading