Skip to content

Commit

Permalink
I'm so tired of fighting compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Feb 28, 2025
1 parent a90b2a0 commit 7d49dba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/stellar-rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,14 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04, ubuntu-22.04 ]
protocol-version: [ 22, 23 ]
protocol-version: [ 22 ]
runs-on: ${{ matrix.os }}
env:
STELLAR_RPC_INTEGRATION_TESTS_ENABLED: true
STELLAR_RPC_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }}
STELLAR_RPC_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core
PROTOCOL_22_CORE_DEBIAN_PKG_VERSION: 22.0.0-2138.721fd0a65.focal
PROTOCOL_22_CORE_DOCKER_IMG: stellar/stellar-core:22.0.0-2138.721fd0a65.focal
PROTOCOL_23_CORE_DEBIAN_PKG_VERSION: 22.1.1-2251.ac9f21ac7.focal~do~not~use~in~prd
PROTOCOL_23_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:22.1.1-2251.ac9f21ac7.focal-do-not-use-in-prd
PROTOCOL_22_CORE_DEBIAN_PKG_VERSION: 22.1.1-2251.ac9f21ac7.focal~do~not~use~in~prd
PROTOCOL_22_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:22.1.1-2251.ac9f21ac7.focal-do-not-use-in-prd

steps:
- uses: actions/checkout@v4
Expand Down
26 changes: 16 additions & 10 deletions cmd/stellar-rpc/internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,22 @@ func newCaptiveCore(cfg *config.Config, logger *supportlog.Entry) (*ledgerbacken
}

captiveConfig := ledgerbackend.CaptiveCoreConfig{
BinaryPath: cfg.StellarCoreBinaryPath,
StoragePath: cfg.CaptiveCoreStoragePath,
NetworkPassphrase: cfg.NetworkPassphrase,
HistoryArchiveURLs: cfg.HistoryArchiveURLs,
CheckpointFrequency: cfg.CheckpointFrequency,
Log: logger.WithField("subservice", "stellar-core"),
Toml: captiveCoreToml,
UserAgent: cfg.ExtendedUserAgent("captivecore"),
UseDB: true,
CoreProtocolVersionFn: func(coreBinaryPath string) (uint, error) { return 23, nil },
BinaryPath: cfg.StellarCoreBinaryPath,
StoragePath: cfg.CaptiveCoreStoragePath,
NetworkPassphrase: cfg.NetworkPassphrase,
HistoryArchiveURLs: cfg.HistoryArchiveURLs,
CheckpointFrequency: cfg.CheckpointFrequency,
Log: logger.WithField("subservice", "stellar-core"),
Toml: captiveCoreToml,
UserAgent: cfg.ExtendedUserAgent("captivecore"),
UseDB: true,
// CoreProtocolVersionFn: func(coreBinaryPath string) (uint, error) {
// proto, err := ledgerbackend.CoreProtocolVersion(coreBinaryPath)
// if err != nil {
// return proto, err
// }
// return proto + 1, nil
// },
}
return ledgerbackend.NewCaptive(captiveConfig)
}
Expand Down

0 comments on commit 7d49dba

Please sign in to comment.