CheatMode should use NBXplorer RPC proxy rather than hardcoded client

This commit is contained in:
nicolas.dorier
2021-11-26 18:34:40 +09:00
parent 70bb6d999e
commit f6afb9a3f0
3 changed files with 4 additions and 2 deletions

View File

@@ -115,6 +115,7 @@ services:
NBXPLORER_MAXGAPSIZE: 10
NBXPLORER_VERBOSE: 1
NBXPLORER_NOAUTH: 1
NBXPLORER_EXPOSERPC: 1
links:
- bitcoind
- litecoind

View File

@@ -103,6 +103,7 @@ services:
NBXPLORER_MINGAPSIZE: 5
NBXPLORER_MAXGAPSIZE: 10
NBXPLORER_VERBOSE: 1
NBXPLORER_EXPOSERPC: 1
NBXPLORER_NOAUTH: 1
links:
- bitcoind

View File

@@ -15,9 +15,9 @@ namespace BTCPayServer.Services
{
private readonly ApplicationDbContextFactory _applicationDbContextFactory;
public Cheater(BTCPayServerOptions opts, ApplicationDbContextFactory applicationDbContextFactory)
public Cheater(BTCPayServerOptions opts, ExplorerClientProvider prov, ApplicationDbContextFactory applicationDbContextFactory)
{
CashCow = new RPCClient(RPCCredentialString.Parse("server=http://127.0.0.1:43782;ceiwHEbqWI83:DwubwWsoo3"), Bitcoin.Instance.GetNetwork(opts.NetworkType));
CashCow = prov.GetExplorerClient("BTC").RPCClient;
_applicationDbContextFactory = applicationDbContextFactory;
}
public RPCClient CashCow