Skip to content

Commit

Permalink
Dont fetch/process deposits until the CCTS has cleared its suspended …
Browse files Browse the repository at this point in the history
…transfers (stratisproject#367)

* Update MaturedBlocksSyncManager.cs

* Fix Test
  • Loading branch information
fassadlr authored Jan 14, 2021
1 parent f8e0034 commit 334b4f0
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ public async Task StartAsync()
/// <returns><c>true</c> if delay between next time we should ask for blocks is required; <c>false</c> otherwise.</returns>
protected async Task<bool> SyncDepositsAsync()
{
if (this.crossChainTransferStore.HasSuspended())
{
this.logger.LogInformation("Deposits will not be fetched until the cross chain transfer store has cleared it's suspended transfers.");
return true;
}

SerializableResult<List<MaturedBlockDepositsModel>> model = await this.federationGatewayClient.GetMaturedBlockDepositsAsync(this.crossChainTransferStore.NextMatureDepositHeight, this.nodeLifetime.ApplicationStopping).ConfigureAwait(false);

if (model == null)
Expand Down

0 comments on commit 334b4f0

Please sign in to comment.