mirror of
https://github.com/luxfi/proto.git
synced 2026-10-30 15:21:09 +00:00
Adds .hanzo/workflows/cicd.yml calling the canonical pipeline and drops the GitHub-hosted workflows it replaces. Lands here because this is where the repo is written — git.hanzo.ai is upstream and github.com is its push mirror, so the same change made on github.com never reaches the runner fleet.
39 lines
890 B
Go
39 lines
890 B
Go
// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package block
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/luxfi/ids"
|
|
"github.com/luxfi/proto/p/txs"
|
|
)
|
|
|
|
var _ Block = (*AbortBlock)(nil)
|
|
|
|
// AbortBlock is the canonical P-Chain abort outcome of a ProposalBlock. It
|
|
// carries a timestamp and no txs; the struct is the zap buffer.
|
|
type AbortBlock struct {
|
|
commonZapBlock
|
|
}
|
|
|
|
func (*AbortBlock) Txs() []*txs.Tx { return nil }
|
|
func (b *AbortBlock) Visit(v Visitor) error { return v.AbortBlock(b) }
|
|
|
|
func NewAbortBlock(
|
|
timestamp time.Time,
|
|
parentID ids.ID,
|
|
height uint64,
|
|
) (*AbortBlock, error) {
|
|
bytes, err := buildBlock(blkAbort, parentID, height, uint64(timestamp.Unix()), nil, nil)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
blk := &AbortBlock{}
|
|
if err := blk.setID(bytes); err != nil {
|
|
return nil, err
|
|
}
|
|
return blk, nil
|
|
}
|