Esempio n. 1
0
        public void TransactionResult_SerializeTest()
        {
            var transactionResult = new TransactionResult()
            {
                Status      = TransactionResultStatus.Mined,
                BlockHash   = Hash.Generate(),
                BlockNumber = 10,
                ReturnValue = new StringValue {
                    Value = "test"
                }.ToByteString()
            };

            var serializeData = transactionResult.Serialize();

            serializeData.ShouldNotBeNull();

            var transactionResult1 = TransactionResult.Parser.ParseFrom(serializeData);

            transactionResult.ShouldBe(transactionResult1);
        }