From: Matt Joiner Date: Tue, 10 Jul 2018 01:14:23 +0000 (+1000) Subject: bep40Priority: Include error in return X-Git-Tag: v1.0.0~97 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f149d0b82a49bae510a9ddc5f722ba92e5eb2a49;p=btrtrc.git bep40Priority: Include error in return --- diff --git a/bep40.go b/bep40.go index 5930247f..fa696bda 100644 --- a/bep40.go +++ b/bep40.go @@ -74,7 +74,7 @@ func bep40PriorityBytes(a, b ipPort) ([]byte, error) { func bep40Priority(a, b ipPort) (peerPriority, error) { bs, err := bep40PriorityBytes(a, b) if err != nil { - return 0, nil + return 0, err } i := len(bs) / 2 _a, _b := bs[:i], bs[i:]