Skip to content

Commit

Permalink
Alternative: Register mapper function of options instead of just the …
Browse files Browse the repository at this point in the history
…extra options

The solution described in comment coinbase/mesh-sdk-go#423 (comment). It mostly demonstrates that it adds too much complexity for what it gains.
  • Loading branch information
bisgardo committed Sep 10, 2022
1 parent 807feaa commit 7514dcf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ require (
github.com/btcsuite/btcd/btcutil v1.1.1
)

replace github.com/coinbase/rosetta-sdk-go => github.com/Concordium/rosetta-sdk-go v0.7.11-0.20220706095914-7942ab456d4f
replace github.com/coinbase/rosetta-sdk-go => ../rosetta-sdk-go
12 changes: 8 additions & 4 deletions pkg/tester/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,14 @@ func InitializeData(
statefulsyncer.WithMaxConcurrency(config.MaxSyncConcurrency),
statefulsyncer.WithPastBlockLimit(config.MaxReorgDepth),
statefulsyncer.WithSeenConcurrency(int64(config.SeenBlockWorkers)),
statefulsyncer.WithExtraSyncerOpts(
syncer.WithCustomHelper(func(h syncer.Helper) syncer.Helper {
return newConcordiumHelper(h)
}),
statefulsyncer.WithCustomSyncerOpts(
func(opts ...syncer.Option) []syncer.Option {
return append(
opts,
syncer.WithCustomHelper(func(h syncer.Helper) syncer.Helper {
return newConcordiumHelper(h)
}))
},
),
}
if config.Data.PruningFrequency != nil {
Expand Down

0 comments on commit 7514dcf

Please sign in to comment.