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

* Add VirtualUTXODiff and VirtualParents to block insertion result * Add GetVirtualUTXOs * Add OnPruningPointUTXOSetOverrideHandler * Add recovery to UTXO index * Add UTXO set override notification * Fix compilation error * Fix iterators in UTXO index and fix TestUTXOIndex * Change Dialing to DEBUG * Change LogBlock location * Rename StopNotify to StopNotifying * Add sanity check * Add comment * Remove receiver from serialization functions Co-authored-by: Elichai Turkel <elichai.turkel@gmail.com>
22 lines
864 B
Go
22 lines
864 B
Go
package testapi
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
// TestBlockBuilder adds to the main BlockBuilder methods required by tests
|
|
type TestBlockBuilder interface {
|
|
model.BlockBuilder
|
|
|
|
// BuildBlockWithParents builds a block with provided parents, coinbaseData and transactions,
|
|
// and returns the block together with its past UTXO-diff from the virtual.
|
|
BuildBlockWithParents(parentHashes []*externalapi.DomainHash, coinbaseData *externalapi.DomainCoinbaseData,
|
|
transactions []*externalapi.DomainTransaction) (*externalapi.DomainBlock, externalapi.UTXODiff, error)
|
|
|
|
BuildUTXOInvalidHeader(parentHashes []*externalapi.DomainHash) (externalapi.BlockHeader, error)
|
|
|
|
BuildUTXOInvalidBlock(parentHashes []*externalapi.DomainHash) (*externalapi.DomainBlock,
|
|
error)
|
|
}
|