sc/context: add network magic into the context

See neo-project/neo#2393, we need this to be able to sign multisig
transactions.
This commit is contained in:
Roman Khimov 2021-03-12 12:59:14 +03:00
parent 4462a6a6b7
commit dc980b5847
3 changed files with 14 additions and 6 deletions

View file

@ -22,7 +22,7 @@ func InitAndSave(tx *transaction.Transaction, acc *wallet.Account, filename stri
priv := acc.PrivateKey()
pub := priv.PublicKey()
sign := priv.Sign(tx.GetSignedPart())
scCtx := context.NewParameterContext("Neo.Core.ContractTransaction", tx)
scCtx := context.NewParameterContext("Neo.Core.ContractTransaction", tx.Network, tx)
h, err := address.StringToUint160(acc.Address)
if err != nil {
return fmt.Errorf("invalid address: %s", acc.Address)