Search in sources :

Example 61 with ProofOfWorkRule

use of co.rsk.validators.ProofOfWorkRule in project rskj by rsksmart.

the class Web3ImplSnapshotTest method getMinerServerForTest.

static MinerServer getMinerServerForTest(World world, SimpleEthereum ethereum) {
    BlockValidationRule rule = new MinerManagerTest.BlockValidationRuleDummy();
    DifficultyCalculator difficultyCalculator = new DifficultyCalculator(config);
    return new MinerServerImpl(config, ethereum, world.getBlockChain(), world.getBlockProcessor(), difficultyCalculator, new ProofOfWorkRule(config).setFallbackMiningEnabled(false), new BlockToMineBuilder(ConfigUtils.getDefaultMiningConfig(), world.getBlockChain().getRepository(), world.getBlockChain().getBlockStore(), world.getBlockChain().getTransactionPool(), difficultyCalculator, new GasLimitCalculator(config), rule, config, null), ConfigUtils.getDefaultMiningConfig());
}
Also used : DifficultyCalculator(co.rsk.core.DifficultyCalculator) BlockValidationRule(co.rsk.validators.BlockValidationRule) ProofOfWorkRule(co.rsk.validators.ProofOfWorkRule)

Aggregations

ProofOfWorkRule (co.rsk.validators.ProofOfWorkRule)61 Test (org.junit.Test)57 SimpleMessageChannel (co.rsk.net.simples.SimpleMessageChannel)40 RskSystemProperties (co.rsk.config.RskSystemProperties)21 BlockGenerator (co.rsk.blockchain.utils.BlockGenerator)16 SyncConfiguration (co.rsk.net.sync.SyncConfiguration)16 SimpleBlockProcessor (co.rsk.net.simples.SimpleBlockProcessor)14 EthereumImpl (org.ethereum.facade.EthereumImpl)14 SimpleChannelManager (org.ethereum.rpc.Simples.SimpleChannelManager)13 World (co.rsk.test.World)11 BlockUnclesValidationRule (co.rsk.validators.BlockUnclesValidationRule)11 PeerScoringManager (co.rsk.scoring.PeerScoringManager)9 ChannelManager (org.ethereum.net.server.ChannelManager)9 Channel (org.ethereum.net.server.Channel)8 InvocationOnMock (org.mockito.invocation.InvocationOnMock)8 TxHandler (co.rsk.net.handler.TxHandler)7 PeerScoring (co.rsk.scoring.PeerScoring)7 BlockDifficulty (co.rsk.core.BlockDifficulty)6 SimpleTransactionPool (co.rsk.net.simples.SimpleTransactionPool)5 DownloadingBodiesSyncState (co.rsk.net.sync.DownloadingBodiesSyncState)4