From 178fc320e7f4979b8634b54c03df80b444d9c32c Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Thu, 12 May 2022 20:01:07 +0300 Subject: [PATCH] - changed uniqueness of the p2p message in order to keep less messages --- bridges/ethElrond/bridgeExecutor.go | 1 + core/messages.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bridges/ethElrond/bridgeExecutor.go b/bridges/ethElrond/bridgeExecutor.go index ebb66841..3b348df6 100644 --- a/bridges/ethElrond/bridgeExecutor.go +++ b/bridges/ethElrond/bridgeExecutor.go @@ -527,6 +527,7 @@ func (executor *bridgeExecutor) ResetRetriesCountOnEthereum() { // ClearStoredP2PSignaturesForEthereum deletes all stored P2P signatures used for Ethereum client func (executor *bridgeExecutor) ClearStoredP2PSignaturesForEthereum() { executor.sigsHolder.ClearStoredSignatures() + executor.log.Info("cleared stored P2P signatures") } // ValidateBatch returns true if the given batch is validated on microservice side diff --git a/core/messages.go b/core/messages.go index f786ea77..e071fa1b 100644 --- a/core/messages.go +++ b/core/messages.go @@ -14,7 +14,7 @@ type SignedMessage struct { // UniqueID will return the string ID assembled from the public key bytes and the message nonce func (msg *SignedMessage) UniqueID() string { - return fmt.Sprintf("%s%d", string(msg.PublicKeyBytes), msg.Nonce) + return fmt.Sprintf("%s%s", string(msg.PublicKeyBytes), string(msg.Payload)) } // EthereumSignature is the message used when the relayers will send an ethereum signature