private static Block createGenesis(NetworkParameters n) { Block genesisBlock = new Block(n); Transaction t = new Transaction(n); // A script containing the difficulty bits and the following message: // // "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks" byte[] bytes = Hex.Decode ("04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73"); t.addInput(new TransactionInput(n, t, bytes)); var stream = new MemoryStream(); var scriptPubKeyBytes = new BinaryWriter(stream); Script.writeBytes(scriptPubKeyBytes, Hex.Decode ("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f")); scriptPubKeyBytes.Write(Script.OP_CHECKSIG); scriptPubKeyBytes.Flush(); t.addOutput(new TransactionOutput(n, t, stream.ToArray())); genesisBlock.addTransaction(t); return genesisBlock; }
public TransactionInput(NetworkParameters n, Transaction t, byte[] bytes) { // TODO: Complete member initialization this.n = n; this.t = t; this.bytes = bytes; }
internal void addTransaction(Transaction t) { throw new NotImplementedException(); }
public TransactionOutput(NetworkParameters n, Transaction t, byte[] p) { // TODO: Complete member initialization this.n = n; this.t = t; this.p = p; }