TU-ADSP / Blockchain-Logging-Framework

This framework provides advanced querying and logging capabilities for Ethereum and Hyperledger blockchains.
Other
7 stars 5 forks source link

[#130, #134] - merge FilterInstruction to Instruction and rename HyperledgerListenerHelper to HyperledgerInstructionHelper #140

Closed mykola-digtiar closed 3 years ago

mykola-digtiar commented 3 years ago

Closes #130. Closes #134.

Instead of merging everything into one Instruction interface, it is better to declare an Instruction as an abstract class since the executeNestedInstrction method does not have to be implemented in every instruction class but in the case of an interface, this would be impossible.

Implementing the Interface as an abstract class gives a possibility to bake in the reusable functionality (executeNestedInstructions method in particular) while giving freedom to a developer to override everything if needed. By default, the execute method does nothing (if not overridden).

The Jenkins tests succeeded.