Skip to content

Commit

Permalink
No need to create actor until plugins are loaded.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsolman committed Apr 3, 2019
1 parent 2ce9a14 commit 403cf50
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ImportBlocks/ImportBlocks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ namespace Neo.Plugins
public class ImportBlocks : Plugin
{
private IActorRef _blockImporter;
public ImportBlocks()
{
_blockImporter = System.ActorSystem.ActorOf(BlockImporter.Props());
}

public override void Configure()
{
Settings.Load(GetConfiguration());
}

protected override void OnPluginsLoaded()
{
_blockImporter = System.ActorSystem.ActorOf(BlockImporter.Props());
SuspendNodeStartup();
_blockImporter.Tell(new BlockImporter.StartImport { BlockchainActorRef = System.Blockchain, OnComplete = OnImportComplete});
}
Expand Down

0 comments on commit 403cf50

Please sign in to comment.