mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 14:16:43 +00:00

* Use a channel from within consensus in order to raise change events in order -- note that this is only a draft commit for discussion * Fix compilation * Check for nil * Allow nil virtualChangeChan * Remove redundant comments * Call notifyVirtualChange instead of notifyUTXOsChanged * Remove redundant comment * Add a separate function for initVirtualChangeHandler * Remove redundant type * Check for nil in the right place * Fix integration test * Add data to virtual changeset and cleanup block added event logic * Renames * Comment Co-authored-by: Ori Newman <orinewman1@gmail.com>
17 lines
538 B
Go
17 lines
538 B
Go
package externalapi
|
|
|
|
// VirtualChangeSet is auxiliary data returned from ValidateAndInsertBlock and ResolveVirtual
|
|
type VirtualChangeSet struct {
|
|
VirtualSelectedParentChainChanges *SelectedChainPath
|
|
VirtualUTXODiff UTXODiff
|
|
VirtualParents []*DomainHash
|
|
VirtualSelectedParentBlueScore uint64
|
|
VirtualDAAScore uint64
|
|
}
|
|
|
|
// SelectedChainPath is a path the of the selected chains between two blocks.
|
|
type SelectedChainPath struct {
|
|
Added []*DomainHash
|
|
Removed []*DomainHash
|
|
}
|