Esempio n. 1
0
        public void Test_genesis_next_consensus()
        {
            var neoGenesis = Neo.Ledger.Blockchain.GenesisBlock;
            var expected   = new UInt160(neoGenesis.NextConsensus.ToArray());

            var fxValidators = Utility.GetNeoFxValidators();
            var fxGenesis    = Genesis.CreateGenesisBlock(fxValidators);

            fxGenesis.NextConsensus.Should().Be(expected);
        }
Esempio n. 2
0
        public void Test_genesis_merkle()
        {
            var neoGenesis = Neo.Ledger.Blockchain.GenesisBlock;
            var expected   = new UInt256(neoGenesis.MerkleRoot.ToArray());

            var fxValidators = Utility.GetNeoFxValidators();
            var fxGenesis    = Genesis.CreateGenesisBlock(fxValidators);

            fxGenesis.MerkleRoot.Should().Be(expected);
        }
Esempio n. 3
0
        public void Test_genesis_block_hash()
        {
            var neoGenesis = Neo.Ledger.Blockchain.GenesisBlock;
            var expected   = new UInt256(neoGenesis.Hash.ToArray());

            var fxValidators = Utility.GetNeoFxValidators();
            var fxGenesis    = Genesis.CreateGenesisBlock(fxValidators);
            var actual       = fxGenesis.CalculateHash();

            actual.Should().Be(expected);
        }