Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

fix(sdb): CreateAccount should check for existence before creating. #1243

Merged
merged 1 commit into from
Oct 22, 2023
Merged
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
try this?
  • Loading branch information
itsdevbear committed Oct 22, 2023
commit bf383e7d7921f026aa0735eb82b2903862995c0f
5 changes: 4 additions & 1 deletion cosmos/x/evm/plugins/state/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ func (p *plugin) Finalize() {
// CreateAccount implements the `StatePlugin` interface by creating a new account
// in the account keeper. It will allow accounts to be overridden.
func (p *plugin) CreateAccount(addr common.Address) {
acc := p.ak.NewAccountWithAddress(p.ctx, addr[:])
acc := p.ak.GetAccount(p.ctx, addr[:])
if acc == nil {
acc = p.ak.NewAccountWithAddress(p.ctx, addr[:])
}
calbera marked this conversation as resolved.
Show resolved Hide resolved

// save the new account in the account keeper
p.ak.SetAccount(p.ctx, acc)
Expand Down
1 change: 1 addition & 0 deletions e2e/testapp/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ services:
ipv4_address: 192.168.10.13

nginx:
depends_on: [ node0, node1, node2, node3 ]
container_name: nginx
image: nginx:latest
ports:
Expand Down
Loading