@Test void equalsReturnsFalseWhenProposalData2IsDifferent() { SignedBeaconBlockHeader otherProposal2 = dataStructureUtil.randomSignedBeaconBlockHeader(); while (Objects.equals(otherProposal2, proposal2)) { otherProposal2 = dataStructureUtil.randomSignedBeaconBlockHeader(); } ProposerSlashing testProposerSlashing = new ProposerSlashing(proposal1, otherProposal2); assertNotEquals(proposerSlashing, testProposerSlashing); }
@Override public boolean equals(Object obj) { if (Objects.isNull(obj)) { return false; } if (this == obj) { return true; } if (!(obj instanceof ProposerSlashing)) { return false; } ProposerSlashing other = (ProposerSlashing) obj; return Objects.equals(this.getHeader_1(), other.getHeader_1()) && Objects.equals(this.getHeader_2(), other.getHeader_2()); }
ProposerSlashing implements Merkleizable, SimpleOffsetSerializable, SSZContainer { @Override public boolean equals(Object obj) { if (Objects.isNull(obj)) { return false; } if (this == obj) { return true; } if (!(obj instanceof ProposerSlashing)) { return false; } ProposerSlashing other = (ProposerSlashing) obj; return Objects.equals(this.getHeader_1(), other.getHeader_1()) && Objects.equals(this.getHeader_2(), other.getHeader_2()); } }
ProposerSlashing implements Merkleizable, SimpleOffsetSerializable, SSZContainer { @Override public boolean equals(Object obj) { if (Objects.isNull(obj)) { return false; } if (this == obj) { return true; } if (!(obj instanceof ProposerSlashing)) { return false; } ProposerSlashing other = (ProposerSlashing) obj; return Objects.equals(this.getHeader_1(), other.getHeader_1()) && Objects.equals(this.getHeader_2(), other.getHeader_2()); } ProposerSlashing(SignedBeaconBlockHeader header_1, SignedBeaconBlockHeader header_2); }
ProposerSlashing implements Merkleizable, SimpleOffsetSerializable, SSZContainer { @Override public boolean equals(Object obj) { if (Objects.isNull(obj)) { return false; } if (this == obj) { return true; } if (!(obj instanceof ProposerSlashing)) { return false; } ProposerSlashing other = (ProposerSlashing) obj; return Objects.equals(this.getHeader_1(), other.getHeader_1()) && Objects.equals(this.getHeader_2(), other.getHeader_2()); } ProposerSlashing(SignedBeaconBlockHeader header_1, SignedBeaconBlockHeader header_2); @Override int getSSZFieldCount(); @Override List<Bytes> get_fixed_parts(); @Override int hashCode(); @Override boolean equals(Object obj); SignedBeaconBlockHeader getHeader_1(); SignedBeaconBlockHeader getHeader_2(); @Override Bytes32 hash_tree_root(); }
ProposerSlashing implements Merkleizable, SimpleOffsetSerializable, SSZContainer { @Override public boolean equals(Object obj) { if (Objects.isNull(obj)) { return false; } if (this == obj) { return true; } if (!(obj instanceof ProposerSlashing)) { return false; } ProposerSlashing other = (ProposerSlashing) obj; return Objects.equals(this.getHeader_1(), other.getHeader_1()) && Objects.equals(this.getHeader_2(), other.getHeader_2()); } ProposerSlashing(SignedBeaconBlockHeader header_1, SignedBeaconBlockHeader header_2); @Override int getSSZFieldCount(); @Override List<Bytes> get_fixed_parts(); @Override int hashCode(); @Override boolean equals(Object obj); SignedBeaconBlockHeader getHeader_1(); SignedBeaconBlockHeader getHeader_2(); @Override Bytes32 hash_tree_root(); static final int SSZ_FIELD_COUNT; }