aboutsummaryrefslogtreecommitdiffstats
path: root/common/bytes.go
diff options
context:
space:
mode:
authorrjl493456442 <garyrong0905@gmail.com>2017-08-21 08:47:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-08-22 23:35:17 +0800
commit28aea46ac08579f3ecd1c35620915b8e1bfcc8b0 (patch)
treea2d00f77c624c5c255af1d05873eb3c5b0f17591 /common/bytes.go
parent2fd5ba6bd41380cf0e21d3ec0ca4bbc4aa7b6c34 (diff)
downloaddexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.gz
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.bz2
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.lz
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.xz
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.zst
dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.zip
core: implement Metropolis EIP 658, receipt status byte
Diffstat (limited to 'common/bytes.go')
-rw-r--r--common/bytes.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/bytes.go b/common/bytes.go
index c445968f2..66577bbfd 100644
--- a/common/bytes.go
+++ b/common/bytes.go
@@ -47,6 +47,9 @@ func FromHex(s string) []byte {
//
// Returns an exact copy of the provided bytes
func CopyBytes(b []byte) (copiedBytes []byte) {
+ if b == nil {
+ return nil
+ }
copiedBytes = make([]byte, len(b))
copy(copiedBytes, b)