diff --git a/eth-node/bridge/nimbus/public_whisper_api.go b/eth-node/bridge/nimbus/public_whisper_api.go index 890f2ad25..50b37480d 100644 --- a/eth-node/bridge/nimbus/public_whisper_api.go +++ b/eth-node/bridge/nimbus/public_whisper_api.go @@ -181,7 +181,7 @@ func (w *nimbusPublicWhisperAPIWrapper) Post(ctx context.Context, req types.NewM defer C.free(unsafe.Pointer(symKeyID)) } if req.PublicKey != nil && len(req.PublicKey) > 0 { - msg.pubKey = (*C.uchar)(C.CBytes(req.PublicKey)) + msg.pubKey = (*C.uchar)(C.CBytes(req.PublicKey[1:])) defer C.free(unsafe.Pointer(msg.pubKey)) } msg.payloadLen = C.size_t(len(req.Payload)) diff --git a/eth-node/bridge/nimbus/whisper.go b/eth-node/bridge/nimbus/whisper.go index bad9cb3d5..917b01c5f 100644 --- a/eth-node/bridge/nimbus/whisper.go +++ b/eth-node/bridge/nimbus/whisper.go @@ -5,12 +5,11 @@ package nimbusbridge // https://golang.org/cmd/cgo/ /* -#cgo LDFLAGS: -Wl,-rpath,'$ORIGIN' -L${SRCDIR} -lnimbus -lpcre -lm #include #include #include #include -void onMessageHandler_cgo(received_message * msg, void* udata); // Forward declaration. +void onMessageHandler_cgo(received_message* msg, void* udata); // Forward declaration. */ import "C"