X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=blobdiff_plain;f=Novacoin%2FCTxIn.cs;h=376f27f1b2bb311b653d1ca7bcf84c231d6e90dd;hp=067ad4639dabd9b3c46f9df6287e8c30473c4bce;hb=161220f258cf9eb640d354951a48b45598301b1a;hpb=1f0b7fb3d5fc3969952610cebe1b173dbece722b
diff --git a/Novacoin/CTxIn.cs b/Novacoin/CTxIn.cs
index 067ad46..376f27f 100644
--- a/Novacoin/CTxIn.cs
+++ b/Novacoin/CTxIn.cs
@@ -84,23 +84,23 @@ namespace Novacoin
///
/// Read vin list from byte sequence.
///
- /// Reference to byte sequence
+ /// Reference to binary reader
/// Inputs array
- public static CTxIn[] ReadTxInList(ref ByteQueue wBytes)
+ internal static CTxIn[] ReadTxInList(ref BinaryReader reader)
{
try
{
// Get amount
- int nInputs = (int)wBytes.GetVarInt();
+ int nInputs = (int)VarInt.ReadVarInt(ref reader);
var vin = new CTxIn[nInputs];
for (int nIndex = 0; nIndex < nInputs; nIndex++)
{
// Fill inputs array
vin[nIndex] = new CTxIn();
- vin[nIndex].prevout = new COutPoint(wBytes.Get(36));
- vin[nIndex].scriptSig = new CScript(wBytes.Get((int)wBytes.GetVarInt()));
- vin[nIndex].nSequence = BitConverter.ToUInt32(wBytes.Get(4), 0);
+ vin[nIndex].prevout = new COutPoint(reader.ReadBytes(36));
+ vin[nIndex].scriptSig = new CScript(reader.ReadBytes((int)VarInt.ReadVarInt(ref reader)));
+ vin[nIndex].nSequence = reader.ReadUInt32();
}
// Return inputs array