Search in sources :

Example 1 with NotFound

use of io.nuls.protocol.model.NotFound in project nuls by nuls-io.

the class GetBlocksByHashHandler method sendNotFound.

private void sendNotFound(NulsDigestData hash, Node node) {
    NotFoundMessage message = new NotFoundMessage();
    NotFound data = new NotFound(MessageDataType.BLOCKS, 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 : NotFound(io.nuls.protocol.model.NotFound) Result(io.nuls.kernel.model.Result)

Example 2 with NotFound

use of io.nuls.protocol.model.NotFound 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 3 with NotFound

use of io.nuls.protocol.model.NotFound 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)

Example 4 with NotFound

use of io.nuls.protocol.model.NotFound in project nuls by nuls-io.

the class GetBlocksByHeightHandler method sendNotFound.

private void sendNotFound(NulsDigestData hash, Node node) {
    NotFoundMessage message = new NotFoundMessage();
    NotFound data = new NotFound(MessageDataType.BLOCKS, 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 : NotFound(io.nuls.protocol.model.NotFound) Result(io.nuls.kernel.model.Result)

Aggregations

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