From 28aea46ac08579f3ecd1c35620915b8e1bfcc8b0 Mon Sep 17 00:00:00 2001 From: rjl493456442 Date: Mon, 21 Aug 2017 08:47:15 +0800 Subject: core: implement Metropolis EIP 658, receipt status byte --- common/bytes.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/bytes.go') 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) -- cgit