forked from hush/hush-android-wallet-sdk
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
732 B
27 lines
732 B
package cash.z.ecc.android.sdk.db.entity
|
|
|
|
import androidx.room.ColumnInfo
|
|
import androidx.room.Entity
|
|
|
|
@Entity(primaryKeys = ["height"], tableName = "compactblocks")
|
|
data class CompactBlockEntity(
|
|
val height: Long,
|
|
@ColumnInfo(typeAffinity = ColumnInfo.BLOB)
|
|
val data: ByteArray
|
|
) {
|
|
override fun equals(other: Any?): Boolean {
|
|
if (this === other) return true
|
|
if (other !is CompactBlockEntity) return false
|
|
|
|
if (height != other.height) return false
|
|
if (!data.contentEquals(other.data)) return false
|
|
|
|
return true
|
|
}
|
|
|
|
override fun hashCode(): Int {
|
|
var result = height.hashCode()
|
|
result = 31 * result + data.contentHashCode()
|
|
return result
|
|
}
|
|
}
|
|
|