Search in sources :

Example 1 with MessageHandler

use of co.rsk.net.MessageHandler in project rskj by rsksmart.

the class RskWireProtocolTest method setup.

@Before
public void setup() {
    config = mock(RskSystemProperties.class);
    peerScoringManager = mock(PeerScoringManager.class);
    messageHandler = mock(MessageHandler.class);
    compositeEthereumListener = mock(CompositeEthereumListener.class);
    genesis = mock(Genesis.class);
    messageRecorder = mock(MessageRecorder.class);
    statusResolver = mock(StatusResolver.class);
    messageQueue = mock(MessageQueue.class);
    channel = mock(Channel.class);
    target = new RskWireProtocol(config, peerScoringManager, messageHandler, compositeEthereumListener, genesis, messageRecorder, statusResolver, messageQueue, channel);
    EmbeddedChannel ch = new EmbeddedChannel();
    ch.pipeline().addLast(target);
    ctx = ch.pipeline().firstContext();
}
Also used : StatusResolver(co.rsk.net.StatusResolver) PeerScoringManager(co.rsk.scoring.PeerScoringManager) CompositeEthereumListener(org.ethereum.listener.CompositeEthereumListener) MessageHandler(co.rsk.net.MessageHandler) MessageQueue(org.ethereum.net.MessageQueue) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) Channel(org.ethereum.net.server.Channel) Genesis(org.ethereum.core.Genesis) EmbeddedChannel(io.netty.channel.embedded.EmbeddedChannel) RskSystemProperties(co.rsk.config.RskSystemProperties) Before(org.junit.Before)

Aggregations

RskSystemProperties (co.rsk.config.RskSystemProperties)1 MessageHandler (co.rsk.net.MessageHandler)1 StatusResolver (co.rsk.net.StatusResolver)1 PeerScoringManager (co.rsk.scoring.PeerScoringManager)1 EmbeddedChannel (io.netty.channel.embedded.EmbeddedChannel)1 Genesis (org.ethereum.core.Genesis)1 CompositeEthereumListener (org.ethereum.listener.CompositeEthereumListener)1 MessageQueue (org.ethereum.net.MessageQueue)1 Channel (org.ethereum.net.server.Channel)1 Before (org.junit.Before)1