-\feffusing System;
+\feff/**
+ * Novacoin classes library
+ * Copyright (C) 2015 Alex D. (balthazar.ad@gmail.com)
+
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ using System;
using System.Text;
using System.Collections.Generic;
}
txnouttype whichType;
- IList<IEnumerable<byte>> solutions;
+ IList<byte[]> solutions;
if (!ScriptCode.Solver(vtx[1].vout[1].scriptPubKey, out whichType, out solutions))
{
{
get
{
- List<byte> r = new List<byte>();
+ var r = new List<byte>();
r.AddRange(header.Bytes);
r.AddRange(VarInt.EncodeVarInt(vtx.LongLength)); // transactions count
- foreach (CTransaction tx in vtx)
+ foreach (var tx in vtx)
{
r.AddRange(tx.Bytes);
}
public override string ToString()
{
- StringBuilder sb = new StringBuilder();
+ var sb = new StringBuilder();
sb.AppendFormat("CBlock(\n header={0},\n", header.ToString());
- foreach(CTransaction tx in vtx)
+ foreach(var tx in vtx)
{
sb.AppendFormat("{0}", tx.ToString());
}
}
sb.Append(")");
-
- // TODO
+
return sb.ToString();
}
}