Esempio n. 1
0
        public void Test_genesis_issue_hash()
        {
            var neoIssueTx = Neo.Ledger.Blockchain.GenesisBlock.Transactions[3];

            (neoIssueTx is Neo.Network.P2P.Payloads.IssueTransaction).Should().BeTrue();
            var expected = new UInt256(neoIssueTx.Hash.ToArray());

            var fxValidators = Utility.GetNeoFxValidators();
            var fxNeoTx      = Genesis.CreateGoverningTokenTx();
            var fxIssueTx    = Genesis.CreateIssueTx(fxNeoTx, fxValidators);

            var actual = fxIssueTx.CalculateHash();

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