Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes type generic from modelChan in all handlers #3715

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/abis/handle_encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

func (opts *AbisOptions) HandleEncode() error {
ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Function], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
funcs := abi.ExtractSigs(opts.Encode)
if len(funcs) == 0 {
errorChan <- fmt.Errorf("not a valid string in HandleEncode")
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/abis/handle_find.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (opts *AbisOptions) HandleFind() error {
// TODO: we might want to use utils.IterateOver Map here

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Function], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
var results []types.Function
var wg sync.WaitGroup
mutex := sync.Mutex{}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/abis/handle_many.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

func (opts *AbisOptions) HandleMany() (err error) {
ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Abi], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, addr := range opts.Addrs {
abiCache := articulate.NewAbiCache(opts.Conn, opts.Known)
address := base.HexToAddress(addr)
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/abis/handle_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (opts *AbisOptions) HandleShow() (err error) {
abiCache := articulate.NewAbiCache(opts.Conn, opts.Known)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Function], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
// Note here, that known ABIs are not downloaded. They are only loaded from the local cache.
for _, addr := range opts.Addrs {
address := base.HexToAddress(addr)
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (opts *BlocksOptions) HandleCount() error {
chain := opts.Globals.Chain

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.BlockCount], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, br := range opts.BlockIds {
blockNums, err := br.ResolveBlocks(chain)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_decache.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (opts *BlocksOptions) HandleDecache() error {
}

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Message], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
if msg, err := decache.Decache(opts.Conn, itemsToRemove, silent, opts.getCacheType()); err != nil {
errorChan <- err
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_hashes.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (opts *BlocksOptions) HandleHashes() error {
nErrors := 0

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.LightBlock], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (opts *BlocksOptions) HandleLogs() error {
logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Log], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (opts *BlocksOptions) HandleShow() error {
nErrors := 0

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Block], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (opts *BlocksOptions) HandleTraces() error {
chain := opts.Globals.Chain

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Trace], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, br := range opts.BlockIds {
blockNums, err := br.ResolveBlocks(chain)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_uncles.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (opts *BlocksOptions) HandleUncles() error {
nErrors := 0

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Block], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_uniq.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (opts *BlocksOptions) HandleUniq() error {
nErrors := 0

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Appearance], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/blocks/handle_withdrawals.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (opts *BlocksOptions) HandleWithdrawals() error {
nErrors := 0

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Withdrawal], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
apps, _, err := identifiers.IdsToApps(chain, opts.BlockIds)
if err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (opts *ChunksOptions) HandleAddresses(blockNums []base.Blknum) error {
chain := opts.Globals.Chain
been_here := 0
ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.ChunkAddress], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
var showAddresses func(walker *walk.CacheWalker, path string, first bool) (bool, error)
if opts.Globals.Verbose {
showAddresses = func(walker *walk.CacheWalker, path string, first bool) (bool, error) {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_appearances.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (opts *ChunksOptions) HandleAppearances(blockNums []base.Blknum) error {
chain := opts.Globals.Chain

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Appearance], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
showAppearances := func(walker *walk.CacheWalker, path string, first bool) (bool, error) {
if path != index.ToBloomPath(path) {
return false, fmt.Errorf("should not happen in showAppearances")
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_blooms.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (opts *ChunksOptions) HandleBlooms(blockNums []base.Blknum) error {
chain := opts.Globals.Chain

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.ChunkBloom], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
showBloom := func(walker *walk.CacheWalker, path string, first bool) (bool, error) {
if path != index.ToBloomPath(path) {
return false, fmt.Errorf("should not happen in showBloom")
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (opts *ChunksOptions) check(blockNums []base.Blknum, silent bool) (error, b
}

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.ReportCheck], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, report := range reports {
if !silent {
modelChan <- &report
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (opts *ChunksOptions) HandleDiff(blockNums []base.Blknum) error {
testMode := opts.Globals.TestMode

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Message], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
walker := walk.NewCacheWalker(
chain,
testMode,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (opts *ChunksOptions) HandleIndex(blockNums []base.Blknum) error {

chain := opts.Globals.Chain
ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.ChunkIndex], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
showIndex := func(walker *walk.CacheWalker, fileName string, first bool) (bool, error) {
if fileName != index.ToBloomPath(fileName) {
return false, fmt.Errorf("should not happen in showIndex")
Expand Down
6 changes: 3 additions & 3 deletions src/apps/chifra/internal/chunks/handle_index_belongs.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (opts *ChunksOptions) HandleIndexBelongs(blockNums []base.Blknum) error {
chain := opts.Globals.Chain

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.AppearanceTable], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
showAddressesBelongs := func(walker *walk.CacheWalker, path string, first bool) (bool, error) {
return opts.handleResolvedRecords(modelChan, walker, path)
}
Expand All @@ -47,7 +47,7 @@ func (opts *ChunksOptions) HandleIndexBelongs(blockNums []base.Blknum) error {
// handleResolvedRecords is a helper function for HandleIndexBelongs and verbose versions of
// HandleAddresses and HandleAppearances. It is called once for each chunk in the index and
// depends on the values of opts.Globals.Verbose and opts.Belongs.
func (opts *ChunksOptions) handleResolvedRecords(modelChan chan types.Modeler[types.AppearanceTable], walker *walk.CacheWalker, path string) (bool, error) {
func (opts *ChunksOptions) handleResolvedRecords(modelChan chan types.Modeler, walker *walk.CacheWalker, path string) (bool, error) {
if path != index.ToBloomPath(path) {
return false, fmt.Errorf("should not happen in showAddressesBelongs")
}
Expand Down Expand Up @@ -113,7 +113,7 @@ func (opts *ChunksOptions) handleResolvedRecords(modelChan chan types.Modeler[ty
// handleResolvedRecords1 is a helper function for HandleIndexBelongs and verbose versions of
// HandleAddresses and HandleAppearances. It is called once for each chunk in the index and
// depends on the values of opts.Globals.Verbose and opts.Belongs.
func (opts *ChunksOptions) handleResolvedRecords1(modelChan chan types.Modeler[types.ChunkAddress], walker *walk.CacheWalker, path string) (bool, error) {
func (opts *ChunksOptions) handleResolvedRecords1(modelChan chan types.Modeler, walker *walk.CacheWalker, path string) (bool, error) {
if path != index.ToBloomPath(path) {
return false, fmt.Errorf("should not happen in showAddressesBelongs")
}
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (opts *ChunksOptions) HandleList(unusedBns []base.Blknum) error {
}

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.IpfsPin], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
var perPage = 1000
if testMode {
perPage = -100
Expand Down
4 changes: 2 additions & 2 deletions src/apps/chifra/internal/chunks/handle_manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (opts *ChunksOptions) HandleManifest(blockNums []base.Blknum) error {

ctx := context.Background()
if opts.Globals.Format == "txt" || opts.Globals.Format == "csv" {
fetchData := func(modelChan chan types.Modeler[types.ChunkRecord], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, chunk := range man.Chunks {
s := types.ChunkRecord{
Range: chunk.Range,
Expand All @@ -50,7 +50,7 @@ func (opts *ChunksOptions) HandleManifest(blockNums []base.Blknum) error {
return output.StreamMany(ctx, fetchData, opts.Globals.OutputOpts())

} else {
fetchData := func(modelChan chan types.Modeler[types.Manifest], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
s := types.Manifest{
Version: man.Version,
Chain: man.Chain,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (opts *ChunksOptions) HandlePin(blockNums []base.Blknum) error {
}

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.ChunkPin], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
hash := base.BytesToHash(config.HeaderHash(config.ExpectedVersion()))
report := types.ChunkPin{
Version: config.VersionTags[hash.Hex()],
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
func (opts *ChunksOptions) HandleStats(blockNums []base.Blknum) error {
chain := opts.Globals.Chain
ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.ChunkStats], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
showFinalizedStats := func(walker *walk.CacheWalker, path string, first bool) (bool, error) {
if path != index.ToBloomPath(path) {
return false, fmt.Errorf("should not happen in showFinalizedStats")
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (opts *ChunksOptions) HandleTag(blockNums []base.Blknum) error {
userHitCtrlC := false
ctx, cancel := context.WithCancel(context.Background())

fetchData := func(modelChan chan types.Modeler[types.Message], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
nChunksTagged := 0
man, err := manifest.ReadManifest(chain, opts.PublisherAddr, manifest.LocalCache)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/chunks/handle_truncate.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (opts *ChunksOptions) HandleTruncate(blockNums []base.Blknum) error {
})

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Message], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {

// First, we will remove the chunks and update the manifest. We do this separately for
// each chunk, so that if we get interrupted, we have a relatively sane state (although,
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/config/handle_paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func (opts *ConfigOptions) HandlePaths() error {
testMode := opts.Globals.TestMode

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.CacheItem], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
root, cache, index := config.PathToRootConfig(),
config.PathToCache(opts.Globals.Chain),
config.PathToIndex(opts.Globals.Chain)
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_accounting.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (opts *ExportOptions) HandleAccounting(monitorArray []monitor.Monitor) erro
)

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Transaction], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
visitAppearance := func(app *types.Appearance) error {
if tx, err := opts.Conn.GetTransactionByAppearance(app, false); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_appearances.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (opts *ExportOptions) HandleAppearances(monitorArray []monitor.Monitor) err
)

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Appearance], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
currentBn := uint32(0)
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, true /* withCount */); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (opts *ExportOptions) HandleBalances(monitorArray []monitor.Monitor) error
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Token], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
currentBn := base.Blknum(0)
prevBalance := base.NewWei(0)

Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_count.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (opts *ExportOptions) HandleCount(monitorArray []monitor.Monitor) error {
)

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Monitor], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, true /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_decache.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (opts *ExportOptions) HandleDecache(monitorArray []monitor.Monitor) error {
silent := !opts.Globals.ShowProgress()

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Message], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if !opts.Globals.IsApiMode() && !usage.QueryUser(getWarning(mon.Address.Hex(), mon.Count()), "Not decaching") {
continue
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (opts *ExportOptions) HandleLogs(monitorArray []monitor.Monitor) error {
logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Log], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_neighbors.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (opts *ExportOptions) HandleNeighbors(monitorArray []monitor.Monitor) error
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Appearance], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (opts *ExportOptions) HandleReceipts(monitorArray []monitor.Monitor) error
logFilter := rpc.NewLogFilter(opts.Emitter, opts.Topic)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Receipt], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (opts *ExportOptions) HandleShow(monitorArray []monitor.Monitor) error {
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Transaction], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_statements.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (opts *ExportOptions) HandleStatements(monitorArray []monitor.Monitor) erro
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Statement], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (opts *ExportOptions) HandleTraces(monitorArray []monitor.Monitor) error {
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Trace], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/export/handle_withdrawals.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (opts *ExportOptions) HandleWithdrawals(monitorArray []monitor.Monitor) err
)

ctx, cancel := context.WithCancel(context.Background())
fetchData := func(modelChan chan types.Modeler[types.Withdrawal], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
for _, mon := range monitorArray {
if apps, cnt, err := mon.ReadAndFilterAppearances(filter, false /* withCount */); err != nil {
errorChan <- err
Expand Down
2 changes: 1 addition & 1 deletion src/apps/chifra/internal/list/handle_bounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (opts *ListOptions) HandleBounds(monitorArray []monitor.Monitor) error {
)

ctx := context.Background()
fetchData := func(modelChan chan types.Modeler[types.Bounds], errorChan chan error) {
fetchData := func(modelChan chan types.Modeler, errorChan chan error) {
if len(monitorArray) == 0 {
errorChan <- errors.New("no monitors found in HandleBounds")
return
Expand Down
Loading
Loading