[#234] *: Fix some lint issues
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
fe5c470a08
commit
33d5568511
4 changed files with 2 additions and 38 deletions
|
@ -238,8 +238,6 @@ func Vote(epoch int, candidates []interop.PublicKey) {
|
|||
} else {
|
||||
runtime.Log(name + ": vote has been failed")
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func voteID(epoch interface{}, args []interop.PublicKey) []byte {
|
||||
|
|
|
@ -218,7 +218,6 @@ func AddPeerIR(nodeInfo []byte) {
|
|||
common.CheckAlphabetWitness(common.AlphabetAddress())
|
||||
|
||||
addToNetmap(ctx, storageNode{info: nodeInfo})
|
||||
return
|
||||
}
|
||||
|
||||
// AddPeer method adds new candidate to the next network map if it was invoked
|
||||
|
|
|
@ -100,39 +100,6 @@ func _deploy(data interface{}, isUpdate bool) {
|
|||
storage.Put(ctx, []byte{prefixRegisterPrice}, defaultRegisterPrice)
|
||||
}
|
||||
|
||||
// remove after v0.13.1 upgrade
|
||||
func shBEFromLEHex(s string) interop.Hash160 {
|
||||
res := make([]byte, interop.Hash160Len)
|
||||
|
||||
ln := len(s) / 2
|
||||
for i := 0; i < ln; i++ {
|
||||
a := hexToNum(s[i*2])
|
||||
b := hexToNum(s[i*2+1])
|
||||
|
||||
var n interface{} = a*16 + b
|
||||
res[ln-1-i] = n.([]byte)[0]
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
// remove after v0.13.1 upgrade
|
||||
func hexToNum(s uint8) int {
|
||||
if s >= '0' && s <= '9' {
|
||||
return int(s) - 48
|
||||
}
|
||||
|
||||
if s >= 'A' && s <= 'F' {
|
||||
return int(s) - 55
|
||||
}
|
||||
|
||||
if s >= 'a' && s <= 'f' {
|
||||
return int(s) - 87
|
||||
}
|
||||
|
||||
panic("invalid hex")
|
||||
}
|
||||
|
||||
// Symbol returns NeoNameService symbol.
|
||||
func Symbol() string {
|
||||
return "NNS"
|
||||
|
|
|
@ -325,8 +325,8 @@ func TestNNSRenew(t *testing.T) {
|
|||
cAcc := c.WithSigners(acc)
|
||||
cAcc.Invoke(t, ts, "renew", "testdomain.com")
|
||||
expected := stackitem.NewMapWithValue([]stackitem.MapElement{
|
||||
{stackitem.Make("name"), stackitem.Make("testdomain.com")},
|
||||
{stackitem.Make("expiration"), stackitem.Make(ts)}})
|
||||
{Key: stackitem.Make("name"), Value: stackitem.Make("testdomain.com")},
|
||||
{Key: stackitem.Make("expiration"), Value: stackitem.Make(ts)}})
|
||||
cAcc.Invoke(t, expected, "properties", "testdomain.com")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue