forked from TrueCloudLab/frostfs-contract
[#19] alphabet: Add log on voting
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
f8190f7a91
commit
2a509ebbee
8 changed files with 49 additions and 8 deletions
|
@ -119,7 +119,13 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,12 @@ func Vote(candidate []byte) {
|
||||||
|
|
||||||
address := runtime.GetExecutingScriptHash()
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue