codestyle: redundant type conversion
This commit is contained in:
parent
1afdb895a1
commit
fe39c565b9
3 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ func TestEncodeDecodeContract(t *testing.T) {
|
||||||
assert.Equal(t, ContractType, tx.Type)
|
assert.Equal(t, ContractType, tx.Type)
|
||||||
assert.IsType(t, tx.Data, &ContractTX{})
|
assert.IsType(t, tx.Data, &ContractTX{})
|
||||||
assert.Equal(t, 0, int(tx.Version))
|
assert.Equal(t, 0, int(tx.Version))
|
||||||
assert.Equal(t, 1, int(len(tx.Inputs)))
|
assert.Equal(t, 1, len(tx.Inputs))
|
||||||
|
|
||||||
input := tx.Inputs[0]
|
input := tx.Inputs[0]
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ func emitSyscall(w *bytes.Buffer, api string) error {
|
||||||
}
|
}
|
||||||
buf := make([]byte, len(api)+1)
|
buf := make([]byte, len(api)+1)
|
||||||
buf[0] = byte(len(api))
|
buf[0] = byte(len(api))
|
||||||
copy(buf[1:], []byte(api))
|
copy(buf[1:], api)
|
||||||
return emit(w, vm.SYSCALL, buf)
|
return emit(w, vm.SYSCALL, buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ func EmitSyscall(w *bytes.Buffer, api string) error {
|
||||||
}
|
}
|
||||||
buf := make([]byte, len(api)+1)
|
buf := make([]byte, len(api)+1)
|
||||||
buf[0] = byte(len(api))
|
buf[0] = byte(len(api))
|
||||||
copy(buf[1:], []byte(api))
|
copy(buf[1:], api)
|
||||||
return Emit(w, SYSCALL, buf)
|
return Emit(w, SYSCALL, buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue