Skip to content

Commit 7514dcf

Browse files
committed
Alternative: Register mapper function of options instead of just the extra options
The solution described in comment https://github.com/coinbase/rosetta-sdk-go/pull/423#discussion_r914876672. It mostly demonstrates that it adds too much complexity for what it gains.
1 parent 807feaa commit 7514dcf

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ require (
2121
github.com/btcsuite/btcd/btcutil v1.1.1
2222
)
2323

24-
replace github.com/coinbase/rosetta-sdk-go => github.com/Concordium/rosetta-sdk-go v0.7.11-0.20220706095914-7942ab456d4f
24+
replace github.com/coinbase/rosetta-sdk-go => ../rosetta-sdk-go

pkg/tester/data.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,14 @@ func InitializeData(
329329
statefulsyncer.WithMaxConcurrency(config.MaxSyncConcurrency),
330330
statefulsyncer.WithPastBlockLimit(config.MaxReorgDepth),
331331
statefulsyncer.WithSeenConcurrency(int64(config.SeenBlockWorkers)),
332-
statefulsyncer.WithExtraSyncerOpts(
333-
syncer.WithCustomHelper(func(h syncer.Helper) syncer.Helper {
334-
return newConcordiumHelper(h)
335-
}),
332+
statefulsyncer.WithCustomSyncerOpts(
333+
func(opts ...syncer.Option) []syncer.Option {
334+
return append(
335+
opts,
336+
syncer.WithCustomHelper(func(h syncer.Helper) syncer.Helper {
337+
return newConcordiumHelper(h)
338+
}))
339+
},
336340
),
337341
}
338342
if config.Data.PruningFrequency != nil {

0 commit comments

Comments
 (0)