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); } }
public Boolean isValidSignedMsg(Coin message) { return isValidSignedMsg((Object)message); }
public SignedMessage SignMessage(Coin coin) { return SignMessage((Object) coin); }