Skip to content

Commit

Permalink
soroban-rpc: Enforce enabling diagnostics events
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jul 31, 2023
1 parent 485ebad commit 0f9e553
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 8 additions & 7 deletions cmd/soroban-rpc/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ func (d *Daemon) Close() error {

// newCaptiveCore creates a new captive core backend instance and returns it.
func newCaptiveCore(cfg *config.Config, logger *supportlog.Entry) (*ledgerbackend.CaptiveStellarCore, error) {
httpPortUint := uint(cfg.CaptiveCoreHTTPPort)
var captiveCoreTomlParams ledgerbackend.CaptiveCoreTomlParams
captiveCoreTomlParams.HTTPPort = &httpPortUint
captiveCoreTomlParams.HistoryArchiveURLs = cfg.HistoryArchiveURLs
captiveCoreTomlParams.NetworkPassphrase = cfg.NetworkPassphrase
captiveCoreTomlParams.Strict = true
captiveCoreTomlParams.UseDB = cfg.CaptiveCoreUseDB
captiveCoreTomlParams := ledgerbackend.CaptiveCoreTomlParams{
HTTPPort: &cfg.CaptiveCoreHTTPPort,
HistoryArchiveURLs: cfg.HistoryArchiveURLs,
NetworkPassphrase: cfg.NetworkPassphrase,
Strict: true,
UseDB: cfg.CaptiveCoreUseDB,
EnforceSorobanDiagnosticEvents: true,
}
captiveCoreToml, err := ledgerbackend.NewCaptiveCoreTomlFromFile(cfg.CaptiveCoreConfigPath, captiveCoreTomlParams)
if err != nil {
logger.WithError(err).Fatal("Invalid captive core toml")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/sirupsen/logrus v1.4.1
github.com/spf13/cobra v0.0.0-20160830174925-9c28e4bbd74e
github.com/spf13/pflag v1.0.5
github.com/stellar/go v0.0.0-20230720111027-4b727cded5cc // bump-soroban-xdr branch
github.com/stellar/go v0.0.0-20230729101930-aa90ee32989a
github.com/stretchr/testify v1.8.0
golang.org/x/mod v0.6.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v0.0.0-20150621231900-db7ff930a189 h1:fvB1AFbBd6SfI9Rd0ooAJp8uLkZDbZaLFHi7ZnNP6uI=
github.com/spf13/viper v0.0.0-20150621231900-db7ff930a189/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM=
github.com/stellar/go v0.0.0-20230720111027-4b727cded5cc h1:StcUrU1KDjR9sofk5+MVLOimS4ouQa2oh9xpxZURTMg=
github.com/stellar/go v0.0.0-20230720111027-4b727cded5cc/go.mod h1:j0lhmN0nnrC8bBZliIboeZeisxgUrSNxXGoxwQFyq94=
github.com/stellar/go v0.0.0-20230729101930-aa90ee32989a h1:ZSbKdLGgleFc5DaqrrJrtoAGM5RQik8GiBTpWQ5aSG0=
github.com/stellar/go v0.0.0-20230729101930-aa90ee32989a/go.mod h1:m9ABBUAExq/TfafyQrLie0owyyAR6IYCRhujttELLHU=
github.com/stellar/go-xdr v0.0.0-20211103144802-8017fc4bdfee h1:fbVs0xmXpBvVS4GBeiRmAE3Le70ofAqFMch1GTiq/e8=
github.com/stellar/go-xdr v0.0.0-20211103144802-8017fc4bdfee/go.mod h1:yoxyU/M8nl9LKeWIoBrbDPQ7Cy+4jxRcWcOayZ4BMps=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down

0 comments on commit 0f9e553

Please sign in to comment.