From 59ad0e5e04b6d6f44c274f2a625b5496050a400e Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Mon, 8 Feb 2021 13:47:52 +0300 Subject: [PATCH] wallet: export GetVerificationScript method We need it to construct witness for P2PNotaryRequest. --- pkg/wallet/account.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/wallet/account.go b/pkg/wallet/account.go index 0ecacfeb8..e15e3f024 100644 --- a/pkg/wallet/account.go +++ b/pkg/wallet/account.go @@ -108,7 +108,7 @@ func (a *Account) SignTx(t *transaction.Transaction) error { } sign := a.privateKey.Sign(data) - verif := a.getVerificationScript() + verif := a.GetVerificationScript() invoc := append([]byte{byte(opcode.PUSHDATA1), 64}, sign...) for i := range t.Scripts { if bytes.Equal(t.Scripts[i].VerificationScript, verif) { @@ -124,7 +124,8 @@ func (a *Account) SignTx(t *transaction.Transaction) error { return nil } -func (a *Account) getVerificationScript() []byte { +// GetVerificationScript returns account's verification script. +func (a *Account) GetVerificationScript() []byte { if a.Contract != nil { return a.Contract.Script }