Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Fix Block Walker For Transactions #5800

Merged

Conversation

brianjohnson5972
Copy link
Contributor

#5674
Fixed paths where original transaction was not passed through by instead caching the original transaction and looking it up by transaction id.

…ry cache for transaction id to initial transaction lookup. GH EOSIO#5674
…Ode.getBlockIdByTransId and using transCache to get information for BlockWalker. GH EOSIO#5674
self.node=node
self.startBlockNum=startBlockNum
self.endBlockNum=endBlockNum

def walkBlocks(self):
start=None
end=None
if self.trans is None and self.transId in self.transCache:
self.trans=self.transCache[self.transId]
Copy link
Contributor

Choose a reason for hiding this comment

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

This will throw a KeyError exception if self.transId is not in self.transCache. It will not return None.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need self.transId in self.transCache.keys(), right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Use self.transCache.get(self.transId). That returns None if the key is not present in the dictionary.

@heifner heifner merged commit f1f37bc into EOSIO:develop Sep 25, 2018
@brianjohnson5972 brianjohnson5972 deleted the 5674-fix-block-walker-for-trans-id branch September 25, 2018 12:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants