Skip to content

Commit 09cc3cf

Browse files
committed
fix: registername gob for new v1 type
1 parent f450f75 commit 09cc3cf

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

backend/cmd/main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"encoding/gob"
45
"fmt"
56
"os"
67

@@ -22,8 +23,14 @@ import (
2223
"github.com/gobitfly/beaconchain/cmd/typescript_converter"
2324
"github.com/gobitfly/beaconchain/cmd/user_service"
2425
"github.com/gobitfly/beaconchain/pkg/commons/log"
26+
"github.com/gobitfly/beaconchain/pkg/commons/types"
2527
)
2628

29+
func init() {
30+
gob.RegisterName("github.com/gobitfly/eth2-beaconchain-explorer/types.UserV1Notification", types.UserV1Notification(0))
31+
32+
}
33+
2734
func main() {
2835
if len(os.Args) < 2 {
2936
log.Fatal(nil, "missing target", 0)

backend/pkg/commons/types/templates.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2099,3 +2099,11 @@ type ValidatorDutyInfo struct {
20992099
ProposerSlashingsCount int8 `db:"proposerslashingscount"`
21002100
AttesterSlashingsCount int8 `db:"attesterslashingscount"`
21012101
}
2102+
2103+
type UserV1Notification int
2104+
2105+
const (
2106+
UserV1Notification_Unknown UserV1Notification = 0
2107+
UserV1Notification_True UserV1Notification = 1
2108+
UserV1Notification_False UserV1Notification = 2
2109+
)

0 commit comments

Comments
 (0)