Skip to content

Commit

Permalink
ethereum as generic upstream - tests
Browse files Browse the repository at this point in the history
  • Loading branch information
a10zn8 committed Oct 30, 2023
1 parent 5c0b93d commit 6c0e150
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,19 @@ class GenericUpstreamMock extends GenericUpstream {
}

GenericUpstreamMock(@NotNull String id, @NotNull Chain chain, @NotNull Reader<JsonRpcRequest, JsonRpcResponse> api, CallMethods methods, Map<String, String> labels) {
super(id, (byte)id.hashCode(), chain,
super(id,
chain,
(byte)id.hashCode(),
getOpts(),
UpstreamsConfig.UpstreamRole.PRIMARY,
methods,
new QuorumForLabels.QuorumItem(1, UpstreamsConfig.Labels.fromMap(labels)),
new ConnectorFactoryMock(api, new EthereumHeadMock()),
ChainConfig.default(),
true,
null
new ConnectorFactoryMock(api, new EthereumHeadMock()),
null,
io.emeraldpay.dshackle.upstream.starknet.StarknetChainSpecific.INSTANCE.&validator,
io.emeraldpay.dshackle.upstream.starknet.StarknetChainSpecific.INSTANCE.&labelDetector,
io.emeraldpay.dshackle.upstream.starknet.StarknetChainSpecific.INSTANCE.&subscriptionTopics,
)
this.ethereumHeadMock = this.getHead() as EthereumHeadMock
setLag(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TestingCommons {
}

static Multistream multistream(GenericUpstreamMock up) {
return new GenericUpstreamMock(Chain.ETHEREUM__MAINNET, [up], Caches.default(), Schedulers.boundedElastic(), tracerMock()).tap {
return new EthereumMultistreamMock(Chain.ETHEREUM__MAINNET, [up], Caches.default(), Schedulers.boundedElastic(), tracerMock()).tap {
start()
}
}
Expand Down

0 comments on commit 6c0e150

Please sign in to comment.