Skip to content
Snippets Groups Projects
Commit ee25dacf authored by Jonah Husson's avatar Jonah Husson
Browse files

Fix use of older idfs

parent aa18a613
Branches
Tags
1 merge request!5validate contract
......@@ -24,6 +24,7 @@ import (
jww "github.com/spf13/jwalterweatherman"
"github.com/xx-labs/sleeve/wallet"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/idf"
"net/http"
"testing"
......@@ -133,6 +134,17 @@ func (i *Impl) Verify(_ context.Context, msg messages.Commitment) error {
return err
}
if idfStruct.HexNodeID == "" {
nid, err := id.Unmarshal(idfStruct.IdBytes[:])
if err != nil {
err = errors.WithMessage(err, "Failed to unmarshal ID")
jww.ERROR.Println(err)
return err
}
idfStruct.HexNodeID = nid.HexEncode()
}
// Get member info from database
hexId := "\\" + idfStruct.HexNodeID[1:]
m, err := i.s.GetMember(hexId)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment