From e6da48880ba9df5a39fbcf1b84d859734a7d813f Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Sat, 21 Mar 2015 13:38:46 -0700 Subject: [PATCH] vm: fix Pad functions, state: add debug log for create new account --- state/state.go | 1 + vm/common.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/state/state.go b/state/state.go index 91a41b9a6..19011af93 100644 --- a/state/state.go +++ b/state/state.go @@ -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 } diff --git a/vm/common.go b/vm/common.go index 85d4966aa..cf72ed6f9 100644 --- a/vm/common.go +++ b/vm/common.go @@ -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 }