mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-21 22:36:42 +00:00
Update command_parser.go
This commit is contained in:
parent
a0ef77decd
commit
b643ca0964
@ -8,11 +8,11 @@ import (
|
||||
"google.golang.org/protobuf/encoding/protojson"
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
||||
"github.com/kaspanet/kaspad/infrastructure/network/netadapter/server/grpcserver/protowire"
|
||||
"github.com/fabbez/topiad/infrastructure/network/netadapter/server/grpcserver/protowire"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func parseCommand(args []string, commandDescs []*commandDescription) (*protowire.KaspadMessage, error) {
|
||||
func parseCommand(args []string, commandDescs []*commandDescription) (*protowire.topiadMessage, error) {
|
||||
commandName, parameterStrings := args[0], args[1:]
|
||||
|
||||
var commandDesc *commandDescription
|
||||
@ -39,7 +39,7 @@ func parseCommand(args []string, commandDescs []*commandDescription) (*protowire
|
||||
setField(commandValue, parameterValue, parameterDesc)
|
||||
}
|
||||
|
||||
return generateKaspadMessage(commandValue, commandDesc)
|
||||
return generatetopiadMessage(commandValue, commandDesc)
|
||||
}
|
||||
|
||||
func setField(commandValue reflect.Value, parameterValue reflect.Value, parameterDesc *parameterDescription) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user