Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default executor in tongo(which helps resolving dns) to LiteStorage #213

Merged
merged 1 commit into from
Oct 9, 2023
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
4 changes: 4 additions & 0 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/tonkeeper/opentonapi/pkg/blockchain/indexer"
"github.com/tonkeeper/tongo"
"go.uber.org/zap"
"golang.org/x/exp/maps"

Expand Down Expand Up @@ -34,6 +35,9 @@ func main() {
litestorage.WithLiteServers(cfg.App.LiteServers),
litestorage.WithBlockChannel(storageBlockCh),
)
// The executor is used to resolve DNS records.
tongo.SetDefaultExecutor(storage)

if err != nil {
log.Fatal("storage init", zap.Error(err))
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/sourcegraph/conc v0.3.0
github.com/stretchr/testify v1.8.4
github.com/tonkeeper/scam_backoffice_rules v0.0.0-20230911133119-702402af5714
github.com/tonkeeper/tongo v1.2.3-0.20230913212511-9b46bf078ec1
github.com/tonkeeper/tongo v1.2.3-0.20230917154429-c63ea34ee004
go.opentelemetry.io/otel v1.16.0
go.opentelemetry.io/otel/metric v1.16.0
go.opentelemetry.io/otel/trace v1.16.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tonkeeper/scam_backoffice_rules v0.0.0-20230911133119-702402af5714 h1:HwtfwtwZK6OyeqvTCqFTxiY8p7gPSS23pV8nir/tKmk=
github.com/tonkeeper/scam_backoffice_rules v0.0.0-20230911133119-702402af5714/go.mod h1:JS7CStRKXjl+nZtRk+f0PReL+mVityMP4O3HupHfyfg=
github.com/tonkeeper/tongo v1.2.3-0.20230913212511-9b46bf078ec1 h1:0Bk19tz36nTJFrky7hNRXQFZ3BxWJOE2zuZM6UxnHUc=
github.com/tonkeeper/tongo v1.2.3-0.20230913212511-9b46bf078ec1/go.mod h1:LdOBjpUz6vLp1EdX3E0XLNks9YI5XMSqaQahfOMrBEY=
github.com/tonkeeper/tongo v1.2.3-0.20230917154429-c63ea34ee004 h1:arw/GFHDaoxFdbXkwCCYmeMt6BVsUNAPR/RWYrGQzt4=
github.com/tonkeeper/tongo v1.2.3-0.20230917154429-c63ea34ee004/go.mod h1:LdOBjpUz6vLp1EdX3E0XLNks9YI5XMSqaQahfOMrBEY=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
Expand Down