Java 类org.bitcoinj.core.Message 实例源码

项目:coinj-dash    文件:DashPeerGroupExtension.java   
@Nullable
@Override
public Message handleGetDataExtension(InventoryItem item) {
    if (network.permitsMasternodesLogic()) {
        final String type = item.type;
        if (type.equals(DashDefinition.INV_TYPE_TRANSACTION_LOCK_REQUEST)) {
            if (!network.getSporkManager().isSporkActive(SporkManager.SPORK_2_INSTANTX))
                return null;
            return network.getInstantXManager().getKnownLockRequest(item.hash);
        } else if (type.equals(DashDefinition.INV_TYPE_TRANSACTION_LOCK_VOTE)) {
            if (!network.getSporkManager().isSporkActive(SporkManager.SPORK_2_INSTANTX))
                return null;
            return network.getInstantXManager().getKnownConsensusVote(item.hash);
        } else if (type.equals(DashDefinition.INV_TYPE_SPORK)) {
            return network.getSporkManager().sporkMessagesRegistry.get(item.hash);
        } else if (type.equals(DashDefinition.INV_TYPE_MASTERNODE_SCANNING_ERROR)) {
            return network.getMasternodeManager().getMasternodeScanningErrorsRegistry().get(item.hash);
        } else if (type.equals(DashDefinition.INV_TYPE_MASTERNODE_ANNOUNCE)) {
            return network.getMasternodeManager().getMasternodeBroadcastRegistry().get(item.hash);
        } else if (type.equals(DashDefinition.INV_TYPE_MASTERNODE_PING)) {
            return network.getMasternodeManager().getMasternodePingRegistry().get(item.hash);
        }
    }

    return null;
}
项目:BitcoinBlockExplorer    文件:Bitcoin.java   
@Nullable
@Override
public List<Message> getData(Peer peer, GetDataMessage m) {
    //Log.i("getData", m.toString());
    //Log.i("onChainDownloadStarted", peer.toString());
    return null;
}
项目:coinj-dash    文件:DashTransactionExtension.java   
@Override
public Message getBroadcastMessage() {
    final DashNetwork dashNetwork = CommonUtils.extractNetworkExtension(tx.getParams());
    if (wireStrategy == null || wireStrategy == DashTransactionWireStrategy.STANDARD || !dashNetwork.permitsLockRequestSending() || dashNetwork.isSyncingMasternodeAssets()) {
        return tx;
    }
    // we are about to broadcast lock request
    if (dashNetwork.permitsInstantX(tx)) {
        dashNetwork.getInstantXManager().internLockRequest(tx.getHash());
    }
    return new TransactionLockRequest(tx);
}
项目:BitcoinBlockExplorer    文件:Bitcoin.java   
@Override
public Message onPreMessageReceived(Peer peer, Message m) {
    //Log.i("onPreMessageReceived", peer.toString());
    return super.onPreMessageReceived(peer, m);
}
项目:okwallet    文件:AbstractPeerEventListener.java   
@Override
public Message onPreMessageReceived(Peer peer, Message m) {
    // Just pass the message right through for further processing.
    return m;
}
项目:okwallet    文件:AbstractPeerEventListener.java   
@Override
public List<Message> getData(Peer peer, GetDataMessage m) {
    return null;
}
项目:cryptwallet    文件:AbstractPeerEventListener.java   
@Override
public Message onPreMessageReceived(Peer peer, Message m) {
    // Just pass the message right through for further processing.
    return m;
}
项目:cryptwallet    文件:AbstractPeerEventListener.java   
@Override
public List<Message> getData(Peer peer, GetDataMessage m) {
    return null;
}
项目:javatool    文件:PPkPeerEventListener.java   
@Override
public List<Message> getData(Peer peer, GetDataMessage message) {
  return null;
}
项目:javatool    文件:PPkPeerEventListener.java   
@Override
public Message onPreMessageReceived(Peer peer, Message message) {
  return null;
}
项目:dashj    文件:AbstractPeerEventListener.java   
@Override
public Message onPreMessageReceived(Peer peer, Message m) {
    // Just pass the message right through for further processing.
    return m;
}
项目:dashj    文件:AbstractPeerEventListener.java   
@Override
public List<Message> getData(Peer peer, GetDataMessage m) {
    return null;
}
项目:bitcoinj    文件:AbstractPeerEventListener.java   
@Override
public Message onPreMessageReceived(Peer peer, Message m) {
    // Just pass the message right through for further processing.
    return m;
}
项目:bitcoinj    文件:AbstractPeerEventListener.java   
@Override
public List<Message> getData(Peer peer, GetDataMessage m) {
    return null;
}