Search in sources :

Example 1 with NotFoundMessage

use of io.nuls.protocol.message.NotFoundMessage in project nuls by nuls-io.

the class GetBlocksHashHandler method sendNotFound.

private void sendNotFound(Node node, NulsDigestData hash) {
    NotFoundMessage event = new NotFoundMessage();
    NotFound data = new NotFound(MessageDataType.HASHES, hash);
    event.setMsgBody(data);
    Result result = this.messageBusService.sendToNode(event, node, true);
    if (result.isFailed()) {
        Log.warn("send not found failed:" + node.getId() + ", hash:" + hash);
    }
}
Also used : NotFoundMessage(io.nuls.protocol.message.NotFoundMessage) NotFound(io.nuls.protocol.model.NotFound) Result(io.nuls.kernel.model.Result)

Example 2 with NotFoundMessage

use of io.nuls.protocol.message.NotFoundMessage in project nuls by nuls-io.

the class GetBlockHandler method sendNotFound.

private void sendNotFound(NulsDigestData hash, Node node) {
    NotFoundMessage message = new NotFoundMessage();
    NotFound data = new NotFound(MessageDataType.BLOCK, hash);
    message.setMsgBody(data);
    Result result = this.messageBusService.sendToNode(message, node, true);
    if (result.isFailed()) {
        Log.warn("send BLOCK NotFound failed:" + node.getId() + ", hash:" + hash);
    }
}
Also used : NotFoundMessage(io.nuls.protocol.message.NotFoundMessage) NotFound(io.nuls.protocol.model.NotFound) Result(io.nuls.kernel.model.Result)

Aggregations

Result (io.nuls.kernel.model.Result)2 NotFoundMessage (io.nuls.protocol.message.NotFoundMessage)2 NotFound (io.nuls.protocol.model.NotFound)2