aboutsummaryrefslogtreecommitdiffstats
path: root/common
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
parent2fd5ba6bd41380cf0e21d3ec0ca4bbc4aa7b6c34 (diff)
downloadgo-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.gz
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.bz2
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.lz
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.xz
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.zst
go-tangerine-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.zip
core: implement Metropolis EIP 658, receipt status byte
Diffstat (limited to 'common')
-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)