Skip to content

Commit a2359e2

Browse files
committed
Resolve misc. linting issues
1 parent e42c23d commit a2359e2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

cmd/stellar-rpc/internal/config/main.go

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
"github.com/spf13/pflag"
99
)
1010

11-
const CaptiveCoreHTTPQueryPort = 11628
12-
1311
// Config represents the configuration of a stellar-rpc server
1412
type Config struct {
1513
ConfigPath string

cmd/stellar-rpc/internal/config/options.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const (
2121
SevenDayOfLedgers = OneDayOfLedgers * 7
2222

2323
defaultHTTPEndpoint = "localhost:8000"
24-
defaultCaptiveCoreQueryPort = 11628
24+
defaultCaptiveCoreHTTPPort = 11626 // regular queries like /info
25+
defaultCaptiveCoreQueryPort = 11628 // high-performance bulk queries like /getledgerentry
2526
)
2627

2728
// TODO: refactor and remove the linter exceptions
@@ -85,10 +86,9 @@ func (cfg *Config) options() Options {
8586
Name: "stellar-captive-core-http-port",
8687
Usage: "HTTP port for Captive Core to listen on (0 disables the HTTP server)",
8788
ConfigKey: &cfg.CaptiveCoreHTTPPort,
88-
DefaultValue: uint(11626),
89+
DefaultValue: uint(defaultCaptiveCoreQueryPort),
8990
},
9091
{
91-
9292
Name: "stellar-captive-core-http-query-port",
9393
Usage: "HTTP port for Captive Core to listen on for high-performance queries like /getledgerentry (0 disables the HTTP server, must not conflict with CAPTIVE_CORE_HTTP_PORT)",
9494
ConfigKey: &cfg.CaptiveCoreHTTPQueryPort,

cmd/stellar-rpc/internal/daemon/interfaces/noOpDaemon.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ func (s noOpCoreClient) SubmitTransaction(context.Context, string) (*proto.TXRes
6060
return &proto.TXResponse{Status: proto.PreflightStatusOk}, nil
6161
}
6262

63-
func (s noOpCoreClient) GetLedgerEntries(ctx context.Context, ledgerSeq uint32, keys ...xdr.LedgerKey) (proto.GetLedgerEntryResponse, error) {
63+
func (s noOpCoreClient) GetLedgerEntries(context.Context, uint32, ...xdr.LedgerKey) (proto.GetLedgerEntryResponse, error) {
6464
return proto.GetLedgerEntryResponse{}, nil
6565
}

0 commit comments

Comments
 (0)