mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 22:58:32 +01:00
Make GetBlocksMessage/GetHeadersMessage not compare equal despite identical contents, resolves issue 140.
This commit is contained in:
parent
21c5e14700
commit
d2e35cc744
2 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ public class GetBlocksMessage extends Message {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof GetBlocksMessage)) return false;
|
||||
if (o == null || o.getClass() != getClass()) return false;
|
||||
GetBlocksMessage other = (GetBlocksMessage) o;
|
||||
return (other.version == version &&
|
||||
locator.size() == other.locator.size() && locator.containsAll(other.locator) &&
|
||||
|
|
|
@ -46,7 +46,7 @@ public class GetHeadersMessage extends GetBlocksMessage {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof GetHeadersMessage)) return false;
|
||||
if (o == null || o.getClass() != getClass()) return false;
|
||||
GetHeadersMessage other = (GetHeadersMessage) o;
|
||||
return (other.version == version &&
|
||||
locator.size() == other.locator.size() && locator.containsAll(other.locator) &&
|
||||
|
|
Loading…
Add table
Reference in a new issue