Skip to content

Commit

Permalink
- changed uniqueness of the p2p message in order to keep less messages
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau committed May 12, 2022
1 parent 8c14aa8 commit 178fc32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions bridges/ethElrond/bridgeExecutor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 178fc32

Please sign in to comment.