コード例 #1
0
ファイル: init_txsub.go プロジェクト: raymens/horizon
func initSubmissionSystem(app *App) {
	app.submitter = &txsub.System{
		Pending:   txsub.NewDefaultSubmissionList(),
		Submitter: txsub.NewDefaultSubmitter(http.DefaultClient, app.config.StellarCoreUrl),
		Results: &db.ResultProvider{
			Core:    app.coreDb,
			History: app.historyDb,
		},
		NetworkPassphrase: app.networkPassphrase,
	}

	go func() {
		ticks := app.pump.Subscribe()

		for {
			<-ticks
			app.submitter.Tick(app.ctx)
		}
	}()

}
コード例 #2
0
ファイル: init_txsub.go プロジェクト: FihlaTV/horizon
func initSubmissionSystem(app *App) {
	cq := &core.Q{Repo: app.CoreRepo(nil)}

	app.submitter = &txsub.System{
		Pending:         txsub.NewDefaultSubmissionList(),
		Submitter:       txsub.NewDefaultSubmitter(http.DefaultClient, app.config.StellarCoreURL),
		SubmissionQueue: sequence.NewManager(),
		Results: &results.DB{
			Core:    cq,
			History: &history.Q{Repo: app.HorizonRepo(nil)},
		},
		Sequences:         cq.SequenceProvider(),
		NetworkPassphrase: app.networkPassphrase,
	}

	go func() {
		ticks := app.pump.Subscribe()

		for _ = range ticks {
			app.submitter.Tick(app.ctx)
		}
	}()

}
コード例 #3
0
ファイル: init_txsub.go プロジェクト: zenododobird/horizon
func initSubmissionSystem(app *App) {
	app.submitter = &txsub.System{
		Pending:         txsub.NewDefaultSubmissionList(),
		Submitter:       txsub.NewDefaultSubmitter(http.DefaultClient, app.config.StellarCoreUrl),
		SubmissionQueue: sequence.NewManager(),
		Results: &db.ResultProvider{
			Core:    app.coreDb,
			History: app.historyDb,
		},
		Sequences: db.SequenceByAddressQuery{
			SqlQuery: app.CoreQuery(),
		},
		NetworkPassphrase: app.networkPassphrase,
	}

	go func() {
		ticks := app.pump.Subscribe()

		for _ = range ticks {
			app.submitter.Tick(app.ctx)
		}
	}()

}