Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
ffac7670
Commit
ffac7670
authored
Jul 10, 2017
by
Dan Gershony
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Breeze with the Logger changes (and submodule)
parent
55bf8c24
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
ApiFeature.cs
Breeze/src/Breeze.Api/ApiFeature.cs
+9
-2
Program.cs
Breeze/src/Breeze.Daemon/Program.cs
+0
-3
LightWalletSyncManager.cs
Breeze/src/Breeze.Wallet/LightWalletSyncManager.cs
+14
-5
StratisBitcoinFullNode
StratisBitcoinFullNode
+1
-1
No files found.
Breeze/src/Breeze.Api/ApiFeature.cs
View file @
ffac7670
...
...
@@ -20,18 +20,25 @@ namespace Breeze.Api
private
readonly
FullNode
fullNode
;
private
readonly
ApiFeatureOptions
apiFeatureOptions
;
private
readonly
IAsyncLoopFactory
asyncLoopFactory
;
private
readonly
ILogger
logger
;
public
ApiFeature
(
IFullNodeBuilder
fullNodeBuilder
,
FullNode
fullNode
,
ApiFeatureOptions
apiFeatureOptions
,
IAsyncLoopFactory
asyncLoopFactory
)
public
ApiFeature
(
IFullNodeBuilder
fullNodeBuilder
,
FullNode
fullNode
,
ApiFeatureOptions
apiFeatureOptions
,
IAsyncLoopFactory
asyncLoopFactory
,
ILoggerFactory
loggerFactory
)
{
this
.
fullNodeBuilder
=
fullNodeBuilder
;
this
.
fullNode
=
fullNode
;
this
.
apiFeatureOptions
=
apiFeatureOptions
;
this
.
asyncLoopFactory
=
asyncLoopFactory
;
this
.
logger
=
loggerFactory
.
CreateLogger
(
this
.
GetType
().
FullName
);
}
public
override
void
Start
()
{
Logs
.
FullNode
.
LogInformation
(
$"Api starting on url
{
this
.
fullNode
.
Settings
.
ApiUri
}
"
);
this
.
logger
.
LogInformation
(
$"Api starting on url
{
this
.
fullNode
.
Settings
.
ApiUri
}
"
);
Program
.
Initialize
(
this
.
fullNodeBuilder
.
Services
,
this
.
fullNode
);
this
.
TryStartKeepaliveMonitor
();
...
...
Breeze/src/Breeze.Daemon/Program.cs
View file @
ffac7670
...
...
@@ -31,9 +31,6 @@ namespace Breeze.Daemon
{
IFullNodeBuilder
fullNodeBuilder
=
null
;
// configure logging
Logs
.
Configure
(
Logs
.
GetLoggerFactory
(
args
));
// get the api uri
var
apiUri
=
args
.
GetValueOf
(
"apiuri"
);
...
...
Breeze/src/Breeze.Wallet/LightWalletSyncManager.cs
View file @
ffac7670
...
...
@@ -24,11 +24,19 @@ namespace Breeze.Wallet
private
readonly
Signals
signals
;
private
ChainedBlock
walletTip
;
private
readonly
INodeLifetime
nodeLifetime
;
private
readonly
IAsyncLoopFactory
asyncLoopFactory
;
public
ChainedBlock
WalletTip
=>
this
.
walletTip
;
public
ChainedBlock
WalletTip
=>
this
.
walletTip
;
public
LightWalletSyncManager
(
ILoggerFactory
loggerFactory
,
IWalletManager
walletManager
,
ConcurrentChain
chain
,
Network
network
,
BlockNotification
blockNotification
,
Signals
signals
,
INodeLifetime
nodeLifetime
)
public
LightWalletSyncManager
(
ILoggerFactory
loggerFactory
,
IWalletManager
walletManager
,
ConcurrentChain
chain
,
Network
network
,
BlockNotification
blockNotification
,
Signals
signals
,
INodeLifetime
nodeLifetime
,
IAsyncLoopFactory
asyncLoopFactory
)
{
this
.
walletManager
=
walletManager
as
WalletManager
;
this
.
chain
=
chain
;
...
...
@@ -37,6 +45,7 @@ namespace Breeze.Wallet
this
.
coinType
=
(
CoinType
)
network
.
Consensus
.
CoinType
;
this
.
logger
=
loggerFactory
.
CreateLogger
(
this
.
GetType
().
FullName
);
this
.
nodeLifetime
=
nodeLifetime
;
this
.
asyncLoopFactory
=
asyncLoopFactory
;
}
/// <inheritdoc />
...
...
@@ -148,7 +157,7 @@ namespace Breeze.Wallet
// if the chain is already past the date we want to sync from, we don't wait, even though the chain might not be fully downloaded.
if
(
this
.
chain
.
Tip
.
Header
.
BlockTime
.
LocalDateTime
<
date
)
{
AsyncLoop
.
RunUntil
(
"WalletFeature.DownloadChain"
,
this
.
nodeLifetime
.
ApplicationStopping
,
this
.
asyncLoopFactory
.
RunUntil
(
"WalletFeature.DownloadChain"
,
this
.
nodeLifetime
.
ApplicationStopping
,
()
=>
this
.
chain
.
Tip
.
Header
.
BlockTime
.
LocalDateTime
>=
date
,
()
=>
this
.
StartSync
(
this
.
chain
.
GetHeightAtTime
(
date
)),
(
ex
)
=>
...
...
@@ -174,7 +183,7 @@ namespace Breeze.Wallet
// if the chain is already past the height we want to sync from, we don't wait, even though the chain might not be fully downloaded.
if
(
this
.
chain
.
Tip
.
Height
<
height
)
{
AsyncLoop
.
RunUntil
(
"WalletFeature.DownloadChain"
,
this
.
nodeLifetime
.
ApplicationStopping
,
this
.
asyncLoopFactory
.
RunUntil
(
"WalletFeature.DownloadChain"
,
this
.
nodeLifetime
.
ApplicationStopping
,
()
=>
this
.
chain
.
Tip
.
Height
>=
height
,
()
=>
this
.
StartSync
(
height
),
(
ex
)
=>
...
...
StratisBitcoinFullNode
@
01447e33
Subproject commit
9cc4517fcbeaffc607fee4d03a83a377b6ee79b4
Subproject commit
01447e3336cd12736d2466fa5d932c550ef549e9
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment