Skip to content

Commit

Permalink
alt decoder if num tables is known.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpe7s committed Sep 28, 2024
1 parent 1b93739 commit cf269a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static AddressLookupTable read(final PublicKey address, final byte[] data, final
final var distinctAccounts = HashMap.<PublicKey, PublicKey>newHashMap(numAccounts);
final var accounts = new PublicKey[numAccounts];
final var reverseLookupTable = new AccountIndexLookupTableEntry[numAccounts];
for (int i = 0; o < data.length; ++i, o += PUBLIC_KEY_LENGTH) {
for (int i = 0; i < numAccounts; ++i, o += PUBLIC_KEY_LENGTH) {
final var pubKey = readPubKey(data, o);
final var previous = distinctAccounts.putIfAbsent(pubKey, pubKey);
if (previous == null) {
Expand Down

0 comments on commit cf269a4

Please sign in to comment.