github.com/MetalBlockchain/metalgo@v1.11.9/vms/platformvm/block/executor/block_state.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package executor
     5  
     6  import (
     7  	"time"
     8  
     9  	"github.com/MetalBlockchain/metalgo/chains/atomic"
    10  	"github.com/MetalBlockchain/metalgo/ids"
    11  	"github.com/MetalBlockchain/metalgo/utils/set"
    12  	"github.com/MetalBlockchain/metalgo/vms/platformvm/block"
    13  	"github.com/MetalBlockchain/metalgo/vms/platformvm/state"
    14  )
    15  
    16  type proposalBlockState struct {
    17  	onDecisionState state.Diff
    18  	onCommitState   state.Diff
    19  	onAbortState    state.Diff
    20  }
    21  
    22  // The state of a block.
    23  // Note that not all fields will be set for a given block.
    24  type blockState struct {
    25  	proposalBlockState
    26  	statelessBlock block.Block
    27  
    28  	onAcceptState state.Diff
    29  	onAcceptFunc  func()
    30  
    31  	inputs         set.Set[ids.ID]
    32  	timestamp      time.Time
    33  	atomicRequests map[ids.ID]*atomic.Requests
    34  }