Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #26 from hal0x2328/master
Browse files Browse the repository at this point in the history
fix Pop() order in Block_GetTransaction and Account_GetBalance
  • Loading branch information
localhuman committed Oct 11, 2017
2 parents e4c1f1f + b919627 commit 0e69a9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neo/SmartContract/StateReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ def Block_GetTransactions(self, engine):

def Block_GetTransaction(self, engine):

block = engine.EvaluationStack.Pop().GetInterface('neo.Core.Block.Block')
index = engine.EvaluationStack.Pop().GetBigInteger()
block = engine.EvaluationStack.Pop().GetInterface('neo.Core.Block.Block')

if block is None or index < 0 or index > len(block.Transactions):
return False
Expand Down Expand Up @@ -597,8 +597,8 @@ def Account_GetVotes(self, engine):

def Account_GetBalance(self, engine):

account = engine.EvaluationStack.Pop().GetInterface('neo.Core.State.AccountState.AccountState')
assetId = UInt256( data=engine.EvaluationStack.Pop().GetByteArray())
account = engine.EvaluationStack.Pop().GetInterface('neo.Core.State.AccountState.AccountState')

if account is None:
return False
Expand Down

0 comments on commit 0e69a9b

Please sign in to comment.