Skip to content

Commit 775c9ab

Browse files
#25 added cache for stake pools in order to boost first start
1 parent 9097454 commit 775c9ab

5 files changed

Lines changed: 126337 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ https://daedaluswallet.io/en/download/) and wait until its synced
5858

5959
### Logging
6060

61+
It uses [nreco](https://github.com/nreco/logging) logging:
6162
+ Default log location: `%TEMP%\SPRD\sprd-{Date}.log`
6263

6364
## Open source software to collaborate on code

Source/Sprd/Sprd.UI/ViewModels/MainWindowViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using System.Net.Mail;
99
using System.Reactive;
10+
using System.Reflection;
1011
using System.Runtime.CompilerServices;
1112
using System.Text.Json;
1213
using System.Threading.Tasks;
@@ -33,7 +34,8 @@ public class MainWindowViewModel : ViewModelBase, IDisposable, INotifyPropertyCh
3334
readonly Window _desktopMainWindow;
3435
private readonly SprdSettings _sprdSettings;
3536

36-
readonly string _stakePoolListDatabase = System.IO.Path.Join(System.IO.Path.GetTempPath(), string.Format("SPRD{0}SPRD_StakePoolList_Cache.json", Path.DirectorySeparatorChar));
37+
readonly string _stakePoolListDatabase = System.IO.Path.Join(new FileInfo(Process.GetCurrentProcess().MainModule.FileName).Directory.FullName,
38+
"SPRD_StakePoolList_Cache.json");
3739

3840
readonly SprdServer _sprdServer;
3941
readonly CardanoServer _cardanoServer;

Source/Sprd/SprdCore/Logging.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ static Logging()
1515
var directory = Path.Join(Path.GetTempPath(), "SPRD");
1616
LogFile = new FileInfo(Path.Join(directory,
1717
string.Format("sprd-{0}.log", DateTime.Now.ToString("yyyy-MM-dd"))));
18-
19-
18+
2019
var loggerSettings = new FileLoggerOptions()
2120
{
2221
FileSizeLimitBytes = 1024 * 8,

0 commit comments

Comments
 (0)