Skip to content

Commit a97f567

Browse files
committed
fix: correct return type declaration and optimize _getRequiredAccounts function
1 parent a114018 commit a97f567

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/core/Initiator.sol

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ abstract contract Initiator is IInitiator, TxAuthManagerBase, TxManagerBase {
6666
revert IInitiator.SelfXCCNotImplemented();
6767
}
6868

69-
function _getRequiredAccounts(MsgInitiateTx.Data calldata msg_) internal pure returns (Account.Data[] memory out) {
69+
function _getRequiredAccounts(MsgInitiateTx.Data calldata msg_) internal pure returns (Account.Data[] memory) {
7070
uint256 upper = 0;
7171
for (uint256 i = 0; i < msg_.contract_transactions.length; ++i) {
7272
upper += msg_.contract_transactions[i].signers.length;
7373
}
74-
out = new Account.Data[](upper);
74+
Account.Data[] memory out = new Account.Data[](upper);
7575
uint256 n = 0;
7676

7777
for (uint256 i = 0; i < msg_.contract_transactions.length; ++i) {
@@ -81,10 +81,6 @@ abstract contract Initiator is IInitiator, TxAuthManagerBase, TxManagerBase {
8181
++n;
8282
}
8383
}
84-
// LCOV_EXCL_START
85-
// This 'return' is an optimization artifact (inlining) and falsely
86-
// reported as uncovered by LCOV when via_ir=true.
8784
return out;
88-
// LCOV_EXCL_END
8985
}
9086
}

0 commit comments

Comments
 (0)