public void Setup() { _blockTree = Substitute.For <IBlockTree>(); _headStep = 10; _blockTree.Head.Returns(Build.A.BlockHeader.WithHash(Keccak.Compute("hash")).WithAura(_headStep, Bytes.Empty).TestObject); _auRaStepCalculator = Substitute.For <IAuRaStepCalculator>(); _auRaValidator = Substitute.For <IAuRaValidator>(); var wallet = new DevWallet(new WalletConfig(), NullLogManager.Instance); _address = wallet.NewAccount(new NetworkCredential(string.Empty, "AAA").SecurePassword); _auRaSealer = new AuRaSealer( _blockTree, _auRaValidator, _auRaStepCalculator, _address, wallet, NullLogManager.Instance); }
public void Setup() { _blockTree = Substitute.For <IBlockTree>(); _headStep = 10; _blockTree.Head.Returns(Build.A.Block.WithHeader(Build.A.BlockHeader.WithHash(Keccak.Compute("hash")).WithAura(_headStep, Array.Empty <byte>()).TestObject).TestObject); _auRaStepCalculator = Substitute.For <IAuRaStepCalculator>(); _validatorStore = Substitute.For <IValidatorStore>(); _validSealerStrategy = Substitute.For <IValidSealerStrategy>(); var signer = new Signer(ChainId.Mainnet, Build.A.PrivateKey.TestObject, LimboLogs.Instance); _address = signer.Address; _auRaSealer = new AuRaSealer( _blockTree, _validatorStore, _auRaStepCalculator, signer, _validSealerStrategy, LimboLogs.Instance); }