mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-29 10:16:45 +00:00

* [NOD-1416] Add entry/exit logs to all the functions. * [NOD-1416] Build some scaffolding inside BlockProcessor. * [NOD-1416] Implement selectParentsForNewBlock. * [NOD-1416] Implement validateBlock. * [NOD-1476] Fix merge errors. * [NOD-1416] Move buildBlock and validateAndInsertBlock to separate files. * [NOD-1416] Begin implementing buildBlock. * [NOD-1416] Implement newBlockDifficulty. * [NOD-1416] Add skeletons for the rest of the buildBlock functions. * [NOD-1416] Implement newBlockUTXOCommitment. * [NOD-1416] Implement newBlockAcceptedIDMerkleRoot. * [NOD-1416] Implement newBlockHashMerkleRoot. * [NOD-1416] Fix bad function call. * [NOD-1416] Implement validateHeaderAndProofOfWork and validateBody. * [NOD-1416] Use ValidateProofOfWorkAndDifficulty. * [NOD-1416] Finish validateAndInsertBlock. * [NOD-1416] Implement newBlockHashMerkleRoot. * [NOD-1416] Implement newBlockAcceptedIDMerkleRoot. * [NOD-1416] Fix a comment. * [NOD-1416] Implement newBlockCoinbaseTransaction. * [NOD-1416] Add VirtualBlockHash. * [NOD-1416] Add ParentHashes and SelectedParent to VirtualData(). * [NOD-1416] Make go vet happy. * [NOD-1416] Implement discardAllChanges. * [NOD-1416] Implement commitAllChanges. * [NOD-1416] Fix factory. * [NOD-1416] Make go vet happy. * [NOD-1416] Format factory. * [NOD-1416] Pass transactionsWithCoinbase to buildHeader. * [NOD-1416] Call VirtualData() from buildHeader. * [NOD-1416] Fix a typo. * [NOD-1416] Fix in-out-of-context/header-body confusion. * [NOD-1416] Extract LogAndMeasureExecutionTime. * [NOD-1416] Add a comment about LogAndMeasureExecutionTime. * [NOD-1416] Simplify discardAllChanges and commitAllChanges. * [NOD-1416] If in-context validations fail, discard all changes and store the block with StatusInvalid. * [NOD-1416] Add a comment above Store. * [NOD-1416] Use errors.As instead of errors.Is.
29 lines
770 B
Go
29 lines
770 B
Go
package coinbasemanager
|
|
|
|
import (
|
|
"github.com/kaspanet/kaspad/domain/consensus/model"
|
|
"github.com/kaspanet/kaspad/domain/consensus/model/externalapi"
|
|
)
|
|
|
|
type coinbaseManager struct {
|
|
ghostdagDataStore model.GHOSTDAGDataStore
|
|
acceptanceDataStore model.AcceptanceDataStore
|
|
}
|
|
|
|
// New instantiates a new CoinbaseManager
|
|
func New(
|
|
ghostdagDataStore model.GHOSTDAGDataStore,
|
|
acceptanceDataStore model.AcceptanceDataStore) model.CoinbaseManager {
|
|
|
|
return &coinbaseManager{
|
|
ghostdagDataStore: ghostdagDataStore,
|
|
acceptanceDataStore: acceptanceDataStore,
|
|
}
|
|
}
|
|
|
|
func (c coinbaseManager) ExpectedCoinbaseTransaction(blockHash *externalapi.DomainHash,
|
|
coinbaseData *externalapi.DomainCoinbaseData) (*externalapi.DomainTransaction, error) {
|
|
|
|
panic("implement me")
|
|
}
|