Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Fix invoke command #613

Merged
merged 8 commits into from
Jul 9, 2020
Merged

Fix invoke command #613

merged 8 commits into from
Jul 9, 2020

Conversation

Tommo-L
Copy link
Contributor

@Tommo-L Tommo-L commented Jun 24, 2020

Close #614 Close neo-project/neo#1735

Don't have to check the balance of cosiginers.

@cloud8little plz, have a check.

@Tommo-L Tommo-L requested a review from cloud8little June 24, 2020 06:56
@shargon
Copy link
Member

shargon commented Jun 24, 2020

Yes, we only need the sender's balance

shargon
shargon previously approved these changes Jun 24, 2020
@superboyiii
Copy link
Member

@cloud8little Could you retest your contract: #614

cloud8little
cloud8little previously approved these changes Jun 24, 2020
@cloud8little
Copy link
Contributor

Test passed.
b189e015e8f952f969e279ee53e63ae

@@ -57,7 +57,7 @@ private void OnInvokeCommand(UInt160 scriptHash, string operation, JArray contra
{
using (SnapshotView snapshot = Blockchain.Singleton.GetSnapshot())
{
UInt160[] accounts = CurrentWallet.GetAccounts().Where(p => !p.Lock && !p.WatchOnly).Select(p => p.ScriptHash).Where(p => NativeContract.GAS.BalanceOf(snapshot, p).Sign > 0).ToArray();
UInt160[] accounts = CurrentWallet.GetAccounts().Where(p => !p.Lock && !p.WatchOnly).Select(p => p.ScriptHash).ToArray();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use CurrentWallet.GetAccount() to avoid this loop?

@Tommo-L Tommo-L dismissed stale reviews from cloud8little and shargon via 870e4b0 June 24, 2020 09:22
vncoelho
vncoelho previously approved these changes Jun 24, 2020
shargon
shargon previously approved these changes Jun 24, 2020
This was referenced Jun 30, 2020
@Tommo-L Tommo-L dismissed stale reviews from shargon and vncoelho via da00bde June 30, 2020 01:50
@ProDog
Copy link
Contributor

ProDog commented Jul 3, 2020

@superboyiii superboyiii merged commit a886171 into neo-project:master Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
7 participants