From a12e065afeedd315e80bd0b928f46dbdea762ec8 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 24 Aug 2015 01:14:52 +0300 Subject: [PATCH] Comments --- Novacoin/CBlockHeader.cs | 9 ++++----- Novacoin/CScript.cs | 18 +++++++++--------- Novacoin/RIPEMD160.cs | 30 +++++++++++++++--------------- Novacoin/SHA1.cs | 28 +++++++++++++++------------- Novacoin/ScriptCode.cs | 28 +++++++++++++++------------- Novacoin/ScryptHash256.cs | 30 +++++++++++++++--------------- Novacoin/VarInt.cs | 1 - 7 files changed, 73 insertions(+), 71 deletions(-) diff --git a/Novacoin/CBlockHeader.cs b/Novacoin/CBlockHeader.cs index 167e32e..129be06 100644 --- a/Novacoin/CBlockHeader.cs +++ b/Novacoin/CBlockHeader.cs @@ -17,16 +17,15 @@ */ using System; -using System.Linq; using System.Text; using System.Collections.Generic; namespace Novacoin { - /// - /// Block header - /// - public class CBlockHeader + /// + /// Block header + /// + public class CBlockHeader { /// /// Version of block schema. diff --git a/Novacoin/CScript.cs b/Novacoin/CScript.cs index 405a4b3..1bd4ede 100644 --- a/Novacoin/CScript.cs +++ b/Novacoin/CScript.cs @@ -197,15 +197,15 @@ namespace Novacoin { var wCodeBytes = new ByteQueue(codeBytes); - instruction opcode; // Current opcode + instruction opcode; // Current instruction byte[] pushArgs; // OP_PUSHDATAn argument - // Scan opcodes sequence + // Scan instructions sequence while (ScriptCode.GetOp(ref wCodeBytes, out opcode, out pushArgs)) { if (opcode > instruction.OP_16) { - // We don't allow control opcodes here + // We don't allow control instructions here return false; } } @@ -224,9 +224,9 @@ namespace Novacoin var wCodeBytes = new ByteQueue(codeBytes); byte[] pushArgs; // OP_PUSHDATAn argument - instruction opcode; // Current opcode + instruction opcode; // Current instruction - // Scan opcodes sequence + // Scan instructions sequence while (ScriptCode.GetOp(ref wCodeBytes, out opcode, out pushArgs)) { var data = pushArgs; @@ -312,13 +312,13 @@ namespace Novacoin { var wCodeBytes = new ByteQueue(codeBytes); - instruction opcode; // Current opcode + instruction opcode; // Current instruction byte[] pushArgs; // OP_PUSHDATAn argument int nCount = 0; var lastOpcode = instruction.OP_INVALIDOPCODE; - // Scan opcodes sequence + // Scan instructions sequence while (ScriptCode.GetOp(ref wCodeBytes, out opcode, out pushArgs)) { if (opcode == instruction.OP_CHECKSIG || opcode == instruction.OP_CHECKSIGVERIFY) @@ -359,7 +359,7 @@ namespace Novacoin // pushes onto the stack: ByteQueue wScriptSig = scriptSig.GetByteQUeue(); - instruction opcode; // Current opcode + instruction opcode; // Current instruction byte[] pushArgs; // OP_PUSHDATAn argument while (ScriptCode.GetOp(ref wScriptSig, out opcode, out pushArgs)) @@ -463,7 +463,7 @@ namespace Novacoin var sb = new StringBuilder(); var wCodeBytes = new ByteQueue(codeBytes); - instruction opcode; // Current opcode + instruction opcode; // Current instruction byte[] pushArgs; // OP_PUSHDATAn argument while (ScriptCode.GetOp(ref wCodeBytes, out opcode, out pushArgs)) { diff --git a/Novacoin/RIPEMD160.cs b/Novacoin/RIPEMD160.cs index 84ce67f..9d2c55f 100644 --- a/Novacoin/RIPEMD160.cs +++ b/Novacoin/RIPEMD160.cs @@ -1,22 +1,22 @@ /** - * - * 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 . + * 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 . */ using Org.BouncyCastle.Crypto.Digests; -using System.Collections.Generic; -using System.Linq; namespace Novacoin { diff --git a/Novacoin/SHA1.cs b/Novacoin/SHA1.cs index 7ef1755..b7da1ad 100644 --- a/Novacoin/SHA1.cs +++ b/Novacoin/SHA1.cs @@ -1,17 +1,19 @@ /** - * - * 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 . + * 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 . */ diff --git a/Novacoin/ScriptCode.cs b/Novacoin/ScriptCode.cs index eaafed1..4f86d73 100644 --- a/Novacoin/ScriptCode.cs +++ b/Novacoin/ScriptCode.cs @@ -1,17 +1,19 @@ /** - * - * 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 . + * 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 . */ using System; diff --git a/Novacoin/ScryptHash256.cs b/Novacoin/ScryptHash256.cs index 96b017f..4f95926 100644 --- a/Novacoin/ScryptHash256.cs +++ b/Novacoin/ScryptHash256.cs @@ -1,22 +1,22 @@ /** - * - * 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 . + * 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 . */ using System; -using System.Collections.Generic; -//using System.Linq; namespace Novacoin { diff --git a/Novacoin/VarInt.cs b/Novacoin/VarInt.cs index 4ebab9d..d376cae 100644 --- a/Novacoin/VarInt.cs +++ b/Novacoin/VarInt.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Novacoin { -- 1.7.1