Search in sources :

Example 1 with NewBlockBroadcastMessage

use of bisq.core.dao.node.messages.NewBlockBroadcastMessage in project bisq-core by bisq-network.

the class FullNodeNetworkService method publishNewBlock.

public void publishNewBlock(Block block) {
    log.info("Publish new block at height={} and block hash={}", block.getHeight(), block.getHash());
    RawBlock rawBlock = RawBlock.fromBlock(block);
    NewBlockBroadcastMessage newBlockBroadcastMessage = new NewBlockBroadcastMessage(rawBlock);
    broadcaster.broadcast(newBlockBroadcastMessage, networkNode.getNodeAddress(), null, true);
}
Also used : RawBlock(bisq.core.dao.state.blockchain.RawBlock) NewBlockBroadcastMessage(bisq.core.dao.node.messages.NewBlockBroadcastMessage)

Aggregations

NewBlockBroadcastMessage (bisq.core.dao.node.messages.NewBlockBroadcastMessage)1 RawBlock (bisq.core.dao.state.blockchain.RawBlock)1