Ejemplo n.º 1
0
        public static void GoofyCreateAndTansferCoin_SouldHaveValidCoin()
        {
            //Arrange
            var signature = new Signature(256);
            Global.GoofyPk = signature.PublicKey;

            var coin = new Coin(signature);

            //Act
            var trans = new Transaction(coin, new Signature(256).PublicKey);

            //Assert

            try
            {
                //trans.CheckTransaction();

                if (!coin.isGoofyCoin())
                    throw new Exception("This coin doenst belong to Goofy");
                if (!coin.isValidSignature())
                    throw new Exception("This coin signature is invalid");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Ejemplo n.º 2
0
 public Boolean isValidSignedMsg(Coin message)
 {
     return isValidSignedMsg((Object)message);
 }
Ejemplo n.º 3
0
 public SignedMessage SignMessage(Coin coin)
 {
     return SignMessage((Object) coin);
 }