mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
wallet: export GetVerificationScript method
We need it to construct witness for P2PNotaryRequest.
This commit is contained in:
parent
afdfa9ce62
commit
59ad0e5e04
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue