git://git.novaco.in
/
NovacoinLibrary.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
99d4a96
)
TrimArray() simplification
master
author
CryptoManiac
<balthazar.ad@gmail.com>
Wed, 16 Sep 2015 13:45:51 +0000 (16:45 +0300)
committer
CryptoManiac
<balthazar.ad@gmail.com>
Wed, 16 Sep 2015 13:45:51 +0000 (16:45 +0300)
Novacoin/Interop.cs
patch
|
blob
|
history
diff --git
a/Novacoin/Interop.cs
b/Novacoin/Interop.cs
index
f3a9e2e
..
54768cf
100644
(file)
--- a/
Novacoin/Interop.cs
+++ b/
Novacoin/Interop.cs
@@
-18,6
+18,7
@@
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
namespace Novacoin
@@
-90,10
+91,7
@@
namespace Novacoin
trimStart--;
}
- byte[] result = new byte[trimStart + 1];
- Array.Copy(bytes, 0, result, 0, trimStart + 1);
-
- return result;
+ return bytes.Take(trimStart + 1).ToArray();
}
public static byte[] AppendWithZeros(byte[] bytes, int nTargetLen=32)