mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-21 09:58:18 +02:00
cmd/main/main.go: Load message codec from config and pass to SpawnProccessor
This commit is contained in:
parent
f8f1d0399f
commit
bbf63e447d
1 changed files with 10 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/eosswedenorg/thalos/api/message"
|
||||||
|
_ "github.com/eosswedenorg/thalos/api/message/json"
|
||||||
api_redis "github.com/eosswedenorg/thalos/api/redis"
|
api_redis "github.com/eosswedenorg/thalos/api/redis"
|
||||||
"github.com/eosswedenorg/thalos/app"
|
"github.com/eosswedenorg/thalos/app"
|
||||||
"github.com/eosswedenorg/thalos/app/abi"
|
"github.com/eosswedenorg/thalos/app/abi"
|
||||||
|
|
@ -187,6 +189,13 @@ func main() {
|
||||||
s.IrreversibleOnly = conf.Ship.IrreversibleOnly
|
s.IrreversibleOnly = conf.Ship.IrreversibleOnly
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Get codec
|
||||||
|
codec, err := message.GetCodec(conf.MessageCodec)
|
||||||
|
if err != nil {
|
||||||
|
log.WithError(err).Fatal("Failed to load codec")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
processor := app.SpawnProccessor(
|
processor := app.SpawnProccessor(
|
||||||
shClient,
|
shClient,
|
||||||
api_redis.NewPublisher(rdb, api_redis.Namespace{
|
api_redis.NewPublisher(rdb, api_redis.Namespace{
|
||||||
|
|
@ -194,6 +203,7 @@ func main() {
|
||||||
ChainID: chainInfo.ChainID.String(),
|
ChainID: chainInfo.ChainID.String(),
|
||||||
}),
|
}),
|
||||||
abi.NewAbiManager(rdb, eosClient, conf.Redis.CacheID),
|
abi.NewAbiManager(rdb, eosClient, conf.Redis.CacheID),
|
||||||
|
codec,
|
||||||
)
|
)
|
||||||
|
|
||||||
// Run the application
|
// Run the application
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue