aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/marshaller.go
diff options
context:
space:
mode:
Diffstat (limited to 'simulation/marshaller.go')
-rw-r--r--simulation/marshaller.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/simulation/marshaller.go b/simulation/marshaller.go
index 86eab3e..6f8aee4 100644
--- a/simulation/marshaller.go
+++ b/simulation/marshaller.go
@@ -30,12 +30,12 @@ type jsonMarshaller struct{}
func (m *jsonMarshaller) Unmarshal(
msgType string, payload []byte) (msg interface{}, err error) {
switch msgType {
- case "info-status":
- var status infoStatus
- if err = json.Unmarshal(payload, &status); err != nil {
+ case "server-notif":
+ var notif serverNotification
+ if err = json.Unmarshal(payload, &notif); err != nil {
break
}
- msg = status
+ msg = notif
case "blocklist":
var blocks BlockList
if err = json.Unmarshal(payload, &blocks); err != nil {
@@ -61,8 +61,8 @@ func (m *jsonMarshaller) Unmarshal(
func (m *jsonMarshaller) Marshal(msg interface{}) (
msgType string, payload []byte, err error) {
switch msg.(type) {
- case infoStatus:
- msgType = "info-status"
+ case serverNotification:
+ msgType = "server-notif"
case *BlockList:
msgType = "blocklist"
case *message: