refactor: we have changed to use our own manual Init for the protocol registration for safety

This commit is contained in:
Derrick Hammer 2024-01-09 12:51:54 -05:00
parent 316e3cddb0
commit cd8e747656
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,8 @@ import (
"git.lumeweb.com/LumeWeb/libs5-go/encoding" "git.lumeweb.com/LumeWeb/libs5-go/encoding"
"git.lumeweb.com/LumeWeb/libs5-go/interfaces" "git.lumeweb.com/LumeWeb/libs5-go/interfaces"
"git.lumeweb.com/LumeWeb/libs5-go/metadata" "git.lumeweb.com/LumeWeb/libs5-go/metadata"
"git.lumeweb.com/LumeWeb/libs5-go/protocol"
"git.lumeweb.com/LumeWeb/libs5-go/protocol/signed"
"git.lumeweb.com/LumeWeb/libs5-go/service" "git.lumeweb.com/LumeWeb/libs5-go/service"
"git.lumeweb.com/LumeWeb/libs5-go/storage" "git.lumeweb.com/LumeWeb/libs5-go/storage"
"git.lumeweb.com/LumeWeb/libs5-go/structs" "git.lumeweb.com/LumeWeb/libs5-go/structs"
@ -81,6 +83,8 @@ func (n *NodeImpl) Db() *bolt.DB {
} }
func (n *NodeImpl) Start() error { func (n *NodeImpl) Start() error {
protocol.Init()
signed.Init()
err := err :=
utils.CreateBucket(cacheBucketName, n.Db(), func(bucket *bolt.Bucket) { utils.CreateBucket(cacheBucketName, n.Db(), func(bucket *bolt.Bucket) {
n.cacheBucket = bucket n.cacheBucket = bucket