All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bitcoinj.evolution.Masternode Maven / Gradle / Ivy

There is a newer version: 21.1.2
Show newest version
package org.bitcoinj.evolution;

import org.bitcoinj.core.*;
import org.bitcoinj.crypto.BLSPublicKey;

public abstract class Masternode extends ChildMessage {

    Sha256Hash proRegTxHash;

    Masternode(NetworkParameters params) {
        super(params);
    }

    Masternode(NetworkParameters params, byte [] payload, int offset) {
        super(params, payload, offset);
    }

    public Sha256Hash getProRegTxHash() {
        return proRegTxHash;
    }

    public Sha256Hash getProTxHash() {
        return proRegTxHash;
    }

    public abstract Sha256Hash getConfirmedHash();

    public abstract MasternodeAddress getService();

    public abstract KeyId getKeyIdOwner();

    public abstract BLSPublicKey getPubKeyOperator();

    public abstract KeyId getKeyIdVoting();

    public abstract boolean isValid();

    public abstract Sha256Hash getConfirmedHashWithProRegTxHash();

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Masternode that = (Masternode) o;

        return proRegTxHash.equals(that.proRegTxHash);
    }

    @Override
    public int hashCode() {
        return proRegTxHash.hashCode();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy