Skip to content

Commit

Permalink
ingest: fixed dead links and remove outdated information. (#5357)
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla authored Jun 26, 2024
1 parent 132b84c commit 8e716d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
12 changes: 6 additions & 6 deletions ingest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ func main() {

_(The `panicIf` function is defined in the [footnotes](#footnotes); it's used here for error-checking brevity.)_

Notice that the mysterious `config` variable above isn't defined. This will be environment-specific and users should consult both the [Captive Core documentation](../../services/horizon/internal/docs/captive_core.md) and the [config docs](./ledgerbackend/captive_core_backend.go#L96-L125) directly for more details if they want to use this backend in production. For now, though, we'll have some hardcoded values for the SDF testnet:
Notice that the mysterious `config` variable above isn't defined. This will be environment-specific and refer to the code [here](./ledgerbackend/captive_core_backend.go) for the complete list of configuration parameters. For now, we'll use the [default](../network/main.go) values defined for the SDF testnet:

```go
networkPassphrase := "Test SDF Network ; September 2015"
archiveURLs := network.TestNetworkhistoryArchiveURLs
networkPassphrase := network.TestNetworkPassphrase
captiveCoreToml, err := ledgerbackend.NewCaptiveCoreToml(
ledgerbackend.CaptiveCoreTomlParams{
NetworkPassphrase: networkPassphrase,
HistoryArchiveURLs: []string{
"https://history.stellar.org/prd/core-testnet/core_testnet_001",
HistoryArchiveURLs: archiveURLs,
},
})
panicIf(err)
Expand Down Expand Up @@ -258,7 +258,7 @@ As of this writing, the stats are as follows:
- total operations: 33845
- succeeded / failed: 25387 / 8458

The full, runnable example is available [here](./example_statistics.go).
The full, runnable example is available [here](./tutorial/example_statistics.go).


# **Example**: Feature Popularity
Expand Down Expand Up @@ -392,4 +392,4 @@ func panicIf(err error) {

2. Since the Stellar testnet undergoes periodic resets, the example outputs from various sections (especially regarding network statistics) will not always be accurate.

3. It's worth noting that even though the [second example](example-tracking-feature-popularity) could *also* be done by using the `LedgerTransactionReader` and inspecting the individual operations, that'd be bit redundant as far as examples go.
3. It's worth noting that even though the [second example](#example-feature-popularity) could *also* be done by using the `LedgerTransactionReader` and inspecting the individual operations, that'd be bit redundant as far as examples go.
3 changes: 1 addition & 2 deletions ingest/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ possible features. This is why this package was created.
# Ledger Backend
Ledger backends are sources of information about Stellar network ledgers. This
can be, for example: a Stellar-Core database, (possibly-remote) Captive
Stellar-Core instances, or History Archives. Please consult the "ledgerbackend"
can be, for example: Captive Stellar-Core instances. Please consult the "ledgerbackend"
package docs for more information about each backend.
Warning: Ledger backends provide low-level xdr.LedgerCloseMeta that should not
Expand Down
9 changes: 3 additions & 6 deletions ingest/tutorial/example_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ import (
"fmt"

"github.com/stellar/go/ingest/ledgerbackend"
"github.com/stellar/go/network"
)

var (
config = captiveCoreConfig()
)

func captiveCoreConfig() ledgerbackend.CaptiveCoreConfig {
archiveURLs := []string{
"https://history.stellar.org/prd/core-testnet/core_testnet_001",
"https://history.stellar.org/prd/core-testnet/core_testnet_002",
"https://history.stellar.org/prd/core-testnet/core_testnet_003",
}
networkPassphrase := "Test SDF Network ; September 2015"
archiveURLs := network.TestNetworkhistoryArchiveURLs
networkPassphrase := network.TestNetworkPassphrase
captiveCoreToml, err := ledgerbackend.NewCaptiveCoreToml(ledgerbackend.CaptiveCoreTomlParams{
NetworkPassphrase: networkPassphrase,
HistoryArchiveURLs: archiveURLs,
Expand Down

0 comments on commit 8e716d8

Please sign in to comment.