mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-02 11:43:40 +02:00
app/ship_processor.go: Return ShipProcessor object from SpawnProcessor()
This commit is contained in:
parent
bbda49ab90
commit
6a5292da5e
1 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ type ShipProcessor struct {
|
||||||
encode message.Encoder
|
encode message.Encoder
|
||||||
}
|
}
|
||||||
|
|
||||||
func SpawnProccessor(shClient *shipclient.Client, writer transport.Writer, abi *abi.AbiManager) {
|
func SpawnProccessor(shClient *shipclient.Client, writer transport.Writer, abi *abi.AbiManager) *ShipProcessor {
|
||||||
processor := &ShipProcessor{
|
processor := &ShipProcessor{
|
||||||
abi: abi,
|
abi: abi,
|
||||||
writer: writer,
|
writer: writer,
|
||||||
|
|
@ -44,6 +44,8 @@ func SpawnProccessor(shClient *shipclient.Client, writer transport.Writer, abi *
|
||||||
// Attach handlers
|
// Attach handlers
|
||||||
shClient.BlockHandler = processor.processBlock
|
shClient.BlockHandler = processor.processBlock
|
||||||
shClient.TraceHandler = processor.processTraces
|
shClient.TraceHandler = processor.processTraces
|
||||||
|
|
||||||
|
return processor
|
||||||
}
|
}
|
||||||
|
|
||||||
func (processor *ShipProcessor) queueMessage(channel transport.Channel, payload []byte) bool {
|
func (processor *ShipProcessor) queueMessage(channel transport.Channel, payload []byte) bool {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue