Skip to content

Commit

Permalink
Merge pull request #243 from ElrondNetwork/change-uniqueness-p2p-message
Browse files Browse the repository at this point in the history
Changed uniqueness of the p2p message
  • Loading branch information
iulianpascalau authored May 12, 2022
2 parents 8c14aa8 + 178fc32 commit 4e733e6
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 4e733e6

Please sign in to comment.