kaspad/domain/consensus/model/interface_processes_blockbuilder.go
Michael Sutton 21b82d7efc
Block template cache (#1994)
* minor text fix

* Implement a block template cache with template modification/reuse mechanism

* Fix compilation error

* Address review comments

* Added a through TestModifyBlockTemplate test

* Update header timestamp if possible

* Avoid copying the transactions when only the header changed

* go fmt
2022-03-31 16:37:48 +03:00

10 lines
371 B
Go

package model
import "github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
// BlockBuilder is responsible for creating blocks from the current state
type BlockBuilder interface {
BuildBlock(coinbaseData *externalapi.DomainCoinbaseData,
transactions []*externalapi.DomainTransaction) (block *externalapi.DomainBlock, coinbaseHasRedReward bool, err error)
}