[#19] alphabet: Add log on voting

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-12 17:20:49 +03:00 committed by Alex Vanin
parent f8190f7a91
commit 2a509ebbee
8 changed files with 49 additions and 8 deletions

View file

@ -119,7 +119,13 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}

View file

@ -119,7 +119,12 @@ func Vote(candidate []byte) {
address := runtime.GetExecutingScriptHash()
_ = engine.AppCall([]byte(neoHash), "vote", address, candidate)
ok := engine.AppCall([]byte(neoHash), "vote", address, candidate).(bool)
if ok {
runtime.Log("successfully voted for validator")
} else {
runtime.Log("vote has been failed")
}
return
}