aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/bytes.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-29 18:36:27 +0800
committerobscuren <geffobscura@gmail.com>2014-04-29 18:36:27 +0800
commit38d6b67b5cfbfb63620a244ea01b5b534917128f (patch)
tree42b4f55e4cd5c2f2a2c28f8551d8b92686abf567 /ethutil/bytes.go
parent5516efdfa0494e028fc3649e4a38da81c56ed598 (diff)
downloadgo-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar.gz
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar.bz2
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar.lz
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar.xz
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.tar.zst
go-tangerine-38d6b67b5cfbfb63620a244ea01b5b534917128f.zip
Fixed state problem
Diffstat (limited to 'ethutil/bytes.go')
-rw-r--r--ethutil/bytes.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/ethutil/bytes.go b/ethutil/bytes.go
index 957fa254a..500368017 100644
--- a/ethutil/bytes.go
+++ b/ethutil/bytes.go
@@ -73,3 +73,13 @@ func BinaryLength(num int) int {
return 1 + BinaryLength(num>>8)
}
+
+// Copy bytes
+//
+// Returns an exact copy of the provided bytes
+func CopyBytes(b []byte) (copiedBytes []byte) {
+ copiedBytes = make([]byte, len(b))
+ copy(copiedBytes, b)
+
+ return
+}