DeliverTxSync/CheckTxSync/CommitSync now return error as well

This commit is contained in:
Anton Kaliaev
2017-11-22 17:34:00 -06:00
parent 01252e8cc8
commit f01f2bbf3a
8 changed files with 66 additions and 36 deletions
+9
View File
@@ -47,3 +47,12 @@ var (
CodeType_BaseUnknownPubKey: "Error (base) unknown pubkey",
}
)
// HumanCode transforms code into a more humane format, such as "Internal error" instead of 0.
func HumanCode(code CodeType) string {
s, ok := code2string[code]
if !ok {
return "Unknown code"
}
return s
}