From d7cb550a5eced063e750689fe5de8f994e22eaab Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 6 Dec 2023 19:23:33 +0300 Subject: [PATCH] [#53] common: Use interop.Hash160 in address producing functions Signed-off-by: Evgenii Stratonikov --- common/ir.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/ir.go b/common/ir.go index fbc813a..a639bf1 100644 --- a/common/ir.go +++ b/common/ir.go @@ -25,20 +25,20 @@ func AlphabetNodes() []interop.PublicKey { } // AlphabetAddress returns multi address of alphabet public keys. -func AlphabetAddress() []byte { +func AlphabetAddress() interop.Hash160 { alphabet := neo.GetCommittee() return Multiaddress(alphabet, false) } // CommitteeAddress returns multi address of committee. -func CommitteeAddress() []byte { +func CommitteeAddress() interop.Hash160 { committee := neo.GetCommittee() return Multiaddress(committee, true) } // Multiaddress returns default multisignature account address for N keys. // If committee set to true, it is `M = N/2+1` committee account. -func Multiaddress(n []interop.PublicKey, committee bool) []byte { +func Multiaddress(n []interop.PublicKey, committee bool) interop.Hash160 { threshold := len(n)*2/3 + 1 if committee { threshold = len(n)/2 + 1