mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +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
|
||||
}
|
||||
|
||||
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{
|
||||
abi: abi,
|
||||
writer: writer,
|
||||
|
|
@ -44,6 +44,8 @@ func SpawnProccessor(shClient *shipclient.Client, writer transport.Writer, abi *
|
|||
// Attach handlers
|
||||
shClient.BlockHandler = processor.processBlock
|
||||
shClient.TraceHandler = processor.processTraces
|
||||
|
||||
return processor
|
||||
}
|
||||
|
||||
func (processor *ShipProcessor) queueMessage(channel transport.Channel, payload []byte) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue