mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-07 16:47:07 +00:00
panic wrapper functions
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ func setGlobalPerm(appState AppState, acc *Account, args []byte) (output []byte,
|
||||
permNum, perm := returnTwoArgs(args)
|
||||
vmAcc := appState.GetAccount(ptypes.GlobalPermissionsAddress256)
|
||||
if vmAcc == nil {
|
||||
panic("cant find the global permissions account")
|
||||
PanicSanity("cant find the global permissions account")
|
||||
}
|
||||
permN := ptypes.PermFlag(Uint64FromWord256(permNum))
|
||||
if !ValidPermN(permN) {
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ func (st *Stack) Push(d Word256) {
|
||||
// currently only called after Sha3
|
||||
func (st *Stack) PushBytes(bz []byte) {
|
||||
if len(bz) != 32 {
|
||||
panic("Invalid bytes size: expected 32")
|
||||
PanicSanity("Invalid bytes size: expected 32")
|
||||
}
|
||||
st.Push(LeftPadWord256(bz))
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ func (vm *VM) Call(caller, callee *Account, code, input []byte, value int64, gas
|
||||
err := transfer(callee, caller, value)
|
||||
if err != nil {
|
||||
// data has been corrupted in ram
|
||||
panic("Could not return value to caller")
|
||||
PanicCrisis("Could not return value to caller")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user