Browse Source

vm: fix Pad functions, state: add debug log for create new account

pull/37/head
Ethan Buchman 10 years ago
parent
commit
e6da48880b
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      state/state.go
  2. +2
    -2
      vm/common.go

+ 1
- 0
state/state.go View File

@ -347,6 +347,7 @@ func (s *State) ExecTx(tx_ blk.Tx, runCall bool) error {
log.Debug(Fmt("Error creating account"))
return err
}
log.Debug(Fmt("Created new account %X", callee.Address.Address()))
code = tx.Data
}


+ 2
- 2
vm/common.go View File

@ -17,12 +17,12 @@ func BytesToWord(bz []byte) Word {
}
func LeftPadWord(bz []byte) (word Word) {
copy(word[:], bz)
copy(word[32-len(bz):], bz)
return
}
func RightPadWord(bz []byte) (word Word) {
copy(word[32-len(bz):], bz)
copy(word[:], bz)
return
}


Loading…
Cancel
Save