Merge pull request #95 from tendermint/vm_panics

label/remove panics in vm
This commit is contained in:
Jae Kwon
2015-06-27 10:10:25 -07:00
3 changed files with 5 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ func sha256Func(input []byte, gas *int64) (output []byte, err error) {
}
// Hash
hasher := sha256.New()
// CONTRACT: this does not err
_, err = hasher.Write(input)
if err != nil {
panic(err)
@@ -69,6 +70,7 @@ func ripemd160Func(input []byte, gas *int64) (output []byte, err error) {
}
// Hash
hasher := ripemd160.New()
// CONTRACT: this does not err
_, err = hasher.Write(input)
if err != nil {
panic(err)