mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 06:54:19 +01:00
Refactor TorService (#2388)
* TorServices Refactor to make value passing easier * Allow specifying Tor services through config Format: BTCPAY_TORSERVICES: "BTCPAYSERVER:URL.ONION:VIRTUALPORT;BTC-P2P:URL.ONION:VIRTUALPORT;BTC-RPC:URL.ONION:VIRTUALPORT;SOMEOTHERONIONSERVICE:URL.ONION:VIRTUALPORT" * add tests * Optimize Tor Services loader and ensure it is loaded as a hosted service * Remove Task from Tor service loader * Use options to parse Tor services * Fix booboo * Fix test after fixing booboo * Adding timeout on long running CanEnumeratetorServices test (cherry picked from commit 274b77e3175960158b803410037e2c7ff31984be) * Renaming timeout variable to better name * Only allow one of torrcfile or torservices Co-authored-by: Kukks <evilkukka@gmail.com> Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
475a68924e
commit
ee0fa71605
@@ -131,5 +131,10 @@ namespace BTCPayServer
|
||||
}
|
||||
return network as T;
|
||||
}
|
||||
public bool TryGetNetwork<T>(string cryptoCode, out T network) where T : BTCPayNetworkBase
|
||||
{
|
||||
network = GetNetwork<T>(cryptoCode);
|
||||
return network != null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user