@@ -0,0 +1,3390 @@
+/**%0A * Copyright 2014 Hash Engineering Solutions%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.bitcoinj.core;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Aimport java.io.IOException;%0Aimport java.io.OutputStream;%0Aimport java.io.Serializable;%0A%0Aimport static org.bitcoinj.core.Utils.uint32ToByteStreamLE;%0A%0Apublic class MasternodeVerification extends Message implements Serializable%7B%0A%0A    private static final Logger log = LoggerFactory.getLogger(MasternodeVerification.class);%0A%0A    TransactionInput vin1;%0A    TransactionInput vin2;%0A    NetAddress addr;%0A    int nonce;%0A    int blockHeight;%0A    MasternodeSignature vchSig1;%0A    MasternodeSignature vchSig2;%0A%0A    Context context;%0A%0A    MasternodeVerification(Context context) %7B%0A        super(context.getParams());%0A        this.context = context;%0A    %7D%0A%0A    MasternodeVerification(Context context, NetAddress addr, int nonce, int blockHeight)%0A    %7B%0A        super(context.getParams());%0A        this.context = context;%0A        this.addr = addr;%0A        this.nonce = nonce;%0A        this.blockHeight = blockHeight;%0A    %7D%0A    MasternodeVerification(NetworkParameters params, byte %5B%5D payload)%0A    %7B%0A        super(params, payload, 0);%0A    %7D%0A%0A    @Override%0A    protected void parse() throws ProtocolException %7B%0A%0A        vin1 = new TransactionInput(params, null, payload, cursor);%0A        cursor += vin1.getMessageSize();%0A%0A        vin2 = new TransactionInput(params, null, payload, cursor);%0A        cursor += vin2.getMessageSize();%0A%0A        addr = new NetAddress(params, payload, cursor, 0);%0A%0A        nonce = (int)readUint32();%0A        blockHeight = (int)readUint32();%0A%0A        vchSig1 = new MasternodeSignature(params, payload, cursor);%0A        cursor += vchSig1.getMessageSize();%0A%0A        vchSig2 = new MasternodeSignature(params, payload, cursor);%0A        cursor += vchSig2.getMessageSize();%0A%0A        length = cursor - offset;%0A%0A    %7D%0A%0A    @Override%0A    protected void bitcoinSerializeToStream(OutputStream stream) throws IOException %7B%0A        vin1.bitcoinSerialize(stream);%0A        vin2.bitcoinSerialize(stream);%0A        addr.bitcoinSerialize(stream);%0A        uint32ToByteStreamLE(nonce, stream);%0A        uint32ToByteStreamLE(blockHeight, stream);%0A        vchSig1.bitcoinSerialize(stream);%0A        vchSig2.bitcoinSerialize(stream);%0A    %7D%0A%0A    void relay()%0A    %7B%0A    %7D%0A%0A    public Sha256Hash getHash()%7B%0A        try %7B%0A            UnsafeByteArrayOutputStream bos = new UnsafeByteArrayOutputStream();%0A            vin1.bitcoinSerialize(bos);%0A            vin2.bitcoinSerialize(bos);%0A            addr.bitcoinSerialize(bos);%0A            uint32ToByteStreamLE(nonce, bos);%0A            uint32ToByteStreamLE(blockHeight, bos);%0A            return Sha256Hash.wrapReversed(Sha256Hash.hashTwice(bos.toByteArray()));%0A        %7D catch (IOException e) %7B%0A            throw new RuntimeException(e); // Cannot happen.%0A        %7D%0A    %7D%0A%7D%0A

Add Dash Core 12.2 (new message)