mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-27 08:07:22 +00:00
No longer return a list, but raw bytes
This commit is contained in:
parent
720521ed4a
commit
0fccbeabcc
1 changed files with 5 additions and 4 deletions
|
|
@ -131,13 +131,14 @@ func Instr(instr string) (int, []string, error) {
|
|||
|
||||
// Script compilation functions
|
||||
// Compiles strings to machine code
|
||||
func Assemble(instructions ...interface{}) (script []string) {
|
||||
script = make([]string, len(instructions))
|
||||
func Assemble(instructions ...interface{}) (script []byte) {
|
||||
//script = make([]string, len(instructions))
|
||||
|
||||
for i, val := range instructions {
|
||||
for _, val := range instructions {
|
||||
instr, _ := CompileInstr(val)
|
||||
|
||||
script[i] = string(instr)
|
||||
//script[i] = string(instr)
|
||||
script = append(script, instr...)
|
||||
}
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue