|
|
|
@ -43,6 +43,13 @@ func (IDC *IdentityChain) IdentityChainHandler(conn net.Conn) { |
|
|
|
|
actionType := proto_identity.IdentityMessageType(msgType) |
|
|
|
|
switch actionType { |
|
|
|
|
case proto_identity.IDENTITY: |
|
|
|
|
IDC.registerIdentity(msgPayload) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (IDC *IdentityChain) registerIdentity(msgPayload []byte) { |
|
|
|
|
identityPayload, err := proto_identity.GetIdentityMessagePayload(msgPayload) |
|
|
|
|
if err != nil { |
|
|
|
|
IDC.log.Error("identity payload not read") |
|
|
|
@ -52,7 +59,4 @@ func (IDC *IdentityChain) IdentityChainHandler(conn net.Conn) { |
|
|
|
|
NewWaitNode := waitnode.DeserializeWaitNode(identityPayload) |
|
|
|
|
IDC.PendingIdentities = append(IDC.PendingIdentities, NewWaitNode) |
|
|
|
|
fmt.Println(len(IDC.PendingIdentities)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|