Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/getaccount #1493

Merged
merged 7 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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 @@ -47,7 +47,7 @@ public class AccountSnapshot {
private boolean deploymentStatus;

// TODO: is there a "canonical" way to take a snapshot fo an account
// where getWorldUpdater().getAccount(address) return null ?
// where getWorldUpdater().get(address) return null ?

/**
* Canonical way of creating an account snapshot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ public void callRomLex(final MessageFrame frame) {
!hub.deploymentStatusOf(foreignCodeAddress),
"EXTCODECOPY should only trigger a ROM_LEX chunk if its target isn't currently deploying");
checkArgument(
!frame.getWorldUpdater().getAccount(foreignCodeAddress).isEmpty()
&& frame.getWorldUpdater().getAccount(foreignCodeAddress).hasCode());
!frame.getWorldUpdater().get(foreignCodeAddress).isEmpty()
&& frame.getWorldUpdater().get(foreignCodeAddress).hasCode());

Optional.ofNullable(frame.getWorldUpdater().get(foreignCodeAddress))
.map(AccountState::getCode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public SStore(MessageFrame frame) {
this.frame = frame;
if (frame.stackSize() > 1) {
this.key = UInt256.fromBytes(frame.getStackItem(0));
final Account account = frame.getWorldUpdater().getAccount(frame.getRecipientAddress());
final Account account = frame.getWorldUpdater().get(frame.getRecipientAddress());
if (account == null) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion linea-constraints
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public MutableAccount getAccount(final Address address) {
if (addressAccountMap.containsKey(address)) {
return addressAccountMap.get(address);
} else if (parent != null) {
Account parentAccount = parent.getAccount(address);
Account parentAccount = parent.get(address);
if (parentAccount == null) {
return null;
} else {
Expand Down
Loading