Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ public class BlockLogTrigger extends Trigger {
@Setter
private List<String> transactionList = new ArrayList<>();


Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NIT] Double blank line before the new field.

@Getter
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[SHOULD] Add an assertion that parentHash is populated by the capsule constructor.

@Setter
private String parentHash;

public BlockLogTrigger() {
setTriggerName(Trigger.BLOCK_TRIGGER_NAME);
}
Expand All @@ -45,6 +50,10 @@ public String toString() {
.append(", latestSolidifiedBlockNumber: ")
.append(latestSolidifiedBlockNumber)
.append(", transactionList: ")
.append(transactionList).toString();
.append(transactionList)
.append(", parentHash: ")
.append(parentHash)
.toString();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[NIT] Trailing blank line inside the toString() method body.

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public BlockLogTriggerCapsule(BlockCapsule block) {
block.getTransactions().forEach(trx ->
blockLogTrigger.getTransactionList().add(trx.getTransactionId().toString())
);
blockLogTrigger.setParentHash(block.getParentHash().toString());
}

public void setLatestSolidifiedBlockNumber(long latestSolidifiedBlockNumber) {
Expand Down
Loading