mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 20:21:56 +00:00
Merge pull request #95 from tendermint/vm_panics
label/remove panics in vm
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user