Skip to content

move atomic backend and consensus callbacks #1011

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

Merged
merged 4 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 4 additions & 4 deletions plugin/evm/atomic/vm/block_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (be *blockExtension) Accept(acceptedBatch database.Batch) error {

// Update VM state for atomic txs in this block. This includes updating the
// atomic tx repo, atomic trie, and shared memory.
atomicState, err := vm.AtomicBackend().GetVerifiedAtomicState(common.Hash(be.block.ID()))
atomicState, err := vm.AtomicBackend.GetVerifiedAtomicState(common.Hash(be.block.ID()))
if err != nil {
// should never occur since [b] must be verified before calling Accept
return err
Expand All @@ -219,7 +219,7 @@ func (be *blockExtension) Reject() error {
log.Debug("Failed to re-issue transaction in rejected block", "txID", tx.ID(), "err", err)
}
}
atomicState, err := vm.AtomicBackend().GetVerifiedAtomicState(common.Hash(be.block.ID()))
atomicState, err := vm.AtomicBackend.GetVerifiedAtomicState(common.Hash(be.block.ID()))
if err != nil {
// should never occur since [b] must be verified before calling Reject
return err
Expand All @@ -230,7 +230,7 @@ func (be *blockExtension) Reject() error {
// CleanupVerified is called when the block is cleaned up after a failed insertion.
func (be *blockExtension) CleanupVerified() {
vm := be.blockExtender.vm
if atomicState, err := vm.AtomicBackend().GetVerifiedAtomicState(be.block.GetEthBlock().Hash()); err == nil {
if atomicState, err := vm.AtomicBackend.GetVerifiedAtomicState(be.block.GetEthBlock().Hash()); err == nil {
atomicState.Reject()
}
}
Expand All @@ -246,7 +246,7 @@ func (be *blockExtension) verifyUTXOsPresent(atomicTxs []*atomic.Tx) error {
b := be.block
blockHash := common.Hash(b.ID())
vm := be.blockExtender.vm
if vm.AtomicBackend().IsBonus(b.Height(), blockHash) {
if vm.AtomicBackend.IsBonus(b.Height(), blockHash) {
log.Info("skipping atomic tx verification on bonus block", "block", blockHash)
return nil
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (C) 2019-2025, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package evm
package vm

import "github.com/ava-labs/avalanchego/ids"

Expand Down
Loading
Loading