aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorEmil <mursalimovemeel@gmail.com>2018-09-15 04:07:13 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-15 04:07:13 +0800
commit86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32 (patch)
tree92ee61a4d5a2c750b6abc257f30b040485e29842 /eth
parent7bb95a9a64c9d26bef4f15fdd9301bb0b5cdb668 (diff)
downloadgo-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.gz
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.zst
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.zip
all: simplify s[:] to s where s is a slice (#17673)
Diffstat (limited to 'eth')
-rw-r--r--eth/tracers/tracer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go
index feb57e060..b519236f2 100644
--- a/eth/tracers/tracer.go
+++ b/eth/tracers/tracer.go
@@ -124,7 +124,7 @@ func (mw *memoryWrapper) pushObject(vm *duktape.Context) {
ctx.Pop2()
ptr := ctx.PushFixedBuffer(len(blob))
- copy(makeSlice(ptr, uint(len(blob))), blob[:])
+ copy(makeSlice(ptr, uint(len(blob))), blob)
return 1
})
vm.PutPropString(obj, "slice")
@@ -204,7 +204,7 @@ func (dw *dbWrapper) pushObject(vm *duktape.Context) {
code := dw.db.GetCode(common.BytesToAddress(popSlice(ctx)))
ptr := ctx.PushFixedBuffer(len(code))
- copy(makeSlice(ptr, uint(len(code))), code[:])
+ copy(makeSlice(ptr, uint(len(code))), code)
return 1
})
vm.PutPropString(obj, "getCode")
@@ -268,7 +268,7 @@ func (cw *contractWrapper) pushObject(vm *duktape.Context) {
blob := cw.contract.Input
ptr := ctx.PushFixedBuffer(len(blob))
- copy(makeSlice(ptr, uint(len(blob))), blob[:])
+ copy(makeSlice(ptr, uint(len(blob))), blob)
return 1
})
vm.PutPropString(obj, "getInput")
@@ -584,7 +584,7 @@ func (jst *Tracer) GetResult() (json.RawMessage, error) {
case []byte:
ptr := jst.vm.PushFixedBuffer(len(val))
- copy(makeSlice(ptr, uint(len(val))), val[:])
+ copy(makeSlice(ptr, uint(len(val))), val)
case common.Address:
ptr := jst.vm.PushFixedBuffer(20)