mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-09-15 14:00:13 +00:00
28 lines
708 B
Go
28 lines
708 B
Go
package externalapi
|
|
|
|
import "math/big"
|
|
|
|
// BlockInfo contains various information about a specific block
|
|
type BlockInfo struct {
|
|
Exists bool
|
|
BlockStatus BlockStatus
|
|
BlueScore uint64
|
|
BlueWork *big.Int
|
|
SelectedParent *DomainHash
|
|
MergeSetBlues []*DomainHash
|
|
MergeSetReds []*DomainHash
|
|
}
|
|
|
|
// Clone returns a clone of BlockInfo
|
|
func (bi *BlockInfo) Clone() *BlockInfo {
|
|
return &BlockInfo{
|
|
Exists: bi.Exists,
|
|
BlockStatus: bi.BlockStatus.Clone(),
|
|
BlueScore: bi.BlueScore,
|
|
BlueWork: new(big.Int).Set(bi.BlueWork),
|
|
SelectedParent: bi.SelectedParent,
|
|
MergeSetBlues: CloneHashes(bi.MergeSetBlues),
|
|
MergeSetReds: CloneHashes(bi.MergeSetReds),
|
|
}
|
|
}
|