neotest: reuse wallet.Account for contract signers

Refs #3245
Refs #3233

Signed-off-by: Evgenii Stratonikov <fyfyrchik@runbox.com>
This commit is contained in:
Evgenii Stratonikov 2023-12-08 15:38:54 +03:00
parent 962b161652
commit c8ff44560e
2 changed files with 30 additions and 54 deletions

View file

@ -301,8 +301,9 @@ func AddNetworkFee(t testing.TB, bc *core.Blockchain, tx *transaction.Transactio
baseFee := bc.GetBaseExecFee()
size := io.GetVarSize(tx)
for _, sgr := range signers {
if csgr, ok := sgr.(ContractSigner); ok {
sc, err := csgr.InvocationScript(tx)
csgr, ok := sgr.(SingleSigner)
if ok && csgr.Account().Contract.InvocationBuilder != nil {
sc, err := csgr.Account().Contract.InvocationBuilder(tx)
require.NoError(t, err)
txCopy := *tx