Skip to content

Commit

Permalink
update models
Browse files Browse the repository at this point in the history
adjust sockety dep
  • Loading branch information
nikooo777 committed Sep 27, 2024
1 parent 2fcba31 commit 48c0925
Show file tree
Hide file tree
Showing 28 changed files with 1,235 additions and 664 deletions.
11 changes: 6 additions & 5 deletions daemon/processing/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import (
"github.com/lbryio/chainquery/sockety"
"github.com/lbryio/chainquery/twilio"
"github.com/lbryio/chainquery/util"

"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"
"github.com/lbryio/sockety/socketyapi"
"github.com/volatiletech/null/v8"

"github.com/OdyseeTeam/sockety/socketyapi"
"github.com/sirupsen/logrus"
"github.com/volatiletech/null/v8"
"github.com/volatiletech/sqlboiler/v4/boil"
"github.com/volatiletech/sqlboiler/v4/queries/qm"
)
Expand Down Expand Up @@ -102,7 +103,7 @@ func ProcessBlock(height uint64, stopper *stop.Group, jsonBlock *lbrycrd.GetBloc
return block, syncTransactionsOfBlock(stopper, txs, block.BlockTime, block.Height)
}

//setPreviousBlockInfo sets the NextBlockHash field from the previous block
// setPreviousBlockInfo sets the NextBlockHash field from the previous block
func setPreviousBlockInfo(currentHeight uint64, currentBLockHash string) error {
if currentHeight < 1 {
return nil
Expand Down Expand Up @@ -244,7 +245,7 @@ func syncTransactionsOfBlock(stopper *stop.Group, txs []string, blockTime uint64
return err
}

//q enables extensive logging on the concurrency of Chainquery. If there is every a deadlock and it's reproducible
// q enables extensive logging on the concurrency of Chainquery. If there is every a deadlock and it's reproducible
// you can use this to debug it. Don't get stuck on the 'q' name either. It was literally a rare single letter that
// I chose, thats' it.
func q(a string) {
Expand Down Expand Up @@ -350,7 +351,7 @@ func queueTx(txs []string, blockTime uint64, blockHeight uint64, manager *txSync
q("QUEUE: end of queuing...passed nil to errorCh")
}

//flush is a helper function for handling the results.
// flush is a helper function for handling the results.
func flush(channel <-chan txProcessResult) {
for range channel {
}
Expand Down
2 changes: 1 addition & 1 deletion daemon/processing/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
util "github.com/lbryio/lbry.go/v2/lbrycrd"
"github.com/lbryio/lbry.go/v2/schema/address/base58"
c "github.com/lbryio/lbry.go/v2/schema/stake"
"github.com/lbryio/sockety/socketyapi"
legacy_pb "github.com/lbryio/types/v1/go"
pb "github.com/lbryio/types/v2/go"

"github.com/OdyseeTeam/sockety/socketyapi"
"github.com/sirupsen/logrus"
"github.com/volatiletech/null/v8"
"github.com/volatiletech/sqlboiler/v4/boil"
Expand Down
10 changes: 4 additions & 6 deletions daemon/processing/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@ import (
"sync"
"time"

"github.com/lbryio/chainquery/sockety"
"github.com/lbryio/sockety/socketyapi"

"github.com/sirupsen/logrus"

"github.com/lbryio/chainquery/datastore"
"github.com/lbryio/chainquery/lbrycrd"
"github.com/lbryio/chainquery/metrics"
"github.com/lbryio/chainquery/model"
"github.com/lbryio/chainquery/sockety"
"github.com/lbryio/chainquery/util"

"github.com/lbryio/lbry.go/v2/extras/errors"
"github.com/lbryio/lbry.go/v2/extras/stop"

"github.com/OdyseeTeam/sockety/socketyapi"
"github.com/sirupsen/logrus"
"github.com/volatiletech/sqlboiler/v4/boil"
"github.com/volatiletech/sqlboiler/v4/queries/qm"
)

//MaxParallelTxProcessing sets the maximum concurrent transactions to process in a block.
// MaxParallelTxProcessing sets the maximum concurrent transactions to process in a block.
var MaxParallelTxProcessing int

type txToProcess struct {
Expand Down
70 changes: 38 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
module github.com/lbryio/chainquery

go 1.19
go 1.22

toolchain go1.22.7

replace github.com/btcsuite/btcd => github.com/lbryio/lbrycrd.go v0.0.0-20200203050410-e1076f12bf19

require (
github.com/OdyseeTeam/sockety v0.0.0-20240425182925-abc82873a079
github.com/btcsuite/btcd v0.0.0-20190213025234-306aecffea32
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
github.com/fatih/color v1.14.1
github.com/fatih/color v1.16.0
github.com/friendsofgo/errors v0.9.2
github.com/fsnotify/fsnotify v1.6.0
github.com/fsnotify/fsnotify v1.7.0
github.com/go-ini/ini v1.67.0
github.com/go-sql-driver/mysql v1.7.0
github.com/golang/protobuf v1.5.2
github.com/golang/protobuf v1.5.3
github.com/gorilla/mux v1.8.0
github.com/jmoiron/sqlx v1.3.5
github.com/johntdyer/slackrus v0.0.0-20220912135606-861993969176
github.com/johntdyer/slackrus v0.0.0-20230315191314-80bc92dee4fc
github.com/kevinburke/go-bindata/v4 v4.0.2
github.com/lbryio/lbry.go/v2 v2.7.2-0.20230307181431-a01aa6dc0629
github.com/lbryio/ozzo-validation v3.0.3-0.20170512160344-202201e212ec+incompatible
github.com/lbryio/sockety v0.0.0-20210909191732-78446d3e9eab
github.com/lbryio/types v0.0.0-20220224142228-73610f6654a6
github.com/mitchellh/mapstructure v1.5.0
github.com/pkg/profile v1.7.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_golang v1.19.0
github.com/rubenv/sql-migrate v1.4.0
github.com/sfreiberg/gotwilio v1.0.0
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.6.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.15.0
github.com/spf13/viper v1.18.2
github.com/volatiletech/null/v8 v8.1.2
github.com/volatiletech/sqlboiler/v4 v4.14.1
github.com/volatiletech/strmangle v0.0.4
golang.org/x/net v0.8.0
golang.org/x/oauth2 v0.6.0
golang.org/x/sync v0.1.0
github.com/volatiletech/strmangle v0.0.6
golang.org/x/net v0.20.0
golang.org/x/oauth2 v0.16.0
golang.org/x/sync v0.5.0
)

require (
Expand All @@ -55,31 +57,35 @@ require (
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
github.com/gorilla/schema v1.1.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/johntdyer/slack-go v0.0.0-20180213144715-95fac1160b22 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/johntdyer/slack-go v0.0.0-20230314151037-c5bf334f9b6e // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/slack-go/slack v0.12.1 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/volatiletech/inflect v0.0.1 // indirect
github.com/volatiletech/randomize v0.0.1 // indirect
github.com/ybbus/jsonrpc/v2 v2.1.7 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/nullbio/null.v6 v6.0.0-20161116030900-40264a2e6b79 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 48c0925

Please sign in to comment.