use of co.rsk.peg.pegininstructions.PeginInstructionsProvider in project rskj by rsksmart.
the class BridgeSupportFactory method newInstance.
public BridgeSupport newInstance(Repository repository, Block executionBlock, RskAddress contractAddress, List<LogInfo> logs) {
ActivationConfig.ForBlock activations = activationConfig.forBlock(executionBlock.getNumber());
Context btcContext = new Context(bridgeConstants.getBtcParams());
BridgeStorageProvider provider = new BridgeStorageProvider(repository, contractAddress, bridgeConstants, activations);
FederationSupport federationSupport = new FederationSupport(bridgeConstants, provider, executionBlock);
BridgeEventLogger eventLogger;
if (logs == null) {
eventLogger = null;
} else {
eventLogger = new BridgeEventLoggerImpl(bridgeConstants, activations, logs);
}
BtcLockSenderProvider btcLockSenderProvider = new BtcLockSenderProvider();
PeginInstructionsProvider peginInstructionsProvider = new PeginInstructionsProvider();
return new BridgeSupport(bridgeConstants, provider, eventLogger, btcLockSenderProvider, peginInstructionsProvider, repository, executionBlock, btcContext, federationSupport, btcBlockStoreFactory, activations);
}
use of co.rsk.peg.pegininstructions.PeginInstructionsProvider in project rskj by rsksmart.
the class BridgeSupportRSKIP220NewMethodsTest method getBridgeSupport.
private BridgeSupport getBridgeSupport(BridgeConstants constants, BtcBlockStoreWithCache.Factory blockStoreFactory, ActivationConfig.ForBlock activations) {
BridgeStorageProvider provider = mock(BridgeStorageProvider.class);
Repository track = mock(Repository.class);
BridgeEventLogger eventLogger = mock(BridgeEventLogger.class);
BtcLockSenderProvider btcLockSenderProvider = mock(BtcLockSenderProvider.class);
Block executionBlock = mock(Block.class);
return new BridgeSupport(constants, provider, eventLogger, btcLockSenderProvider, new PeginInstructionsProvider(), track, executionBlock, new Context(constants.getBtcParams()), new FederationSupport(constants, provider, executionBlock), blockStoreFactory, activations);
}
Aggregations