Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blockchain/standalone: Add IsCoinBaseTx. #1815

Merged
merged 1 commit into from
Aug 7, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Aug 5, 2019

This requires PR #1812.

The copies the standalone IsCoinBaseTx function from the blockchain module to the blockchain/standalone module.

It also updates the documentation and includes comprehensive tests.

@davecgh davecgh added this to the 1.5.0 milestone Aug 5, 2019
@davecgh
Copy link
Member Author

davecgh commented Aug 5, 2019

$ go test -coverprofile=cov.out && go tool cover -func=cov.out
PASS
coverage: 100.0% of statements
ok      github.com/decred/dcrd/blockchain/standalone    0.513s
github.com/decred/dcrd/blockchain/standalone/error.go:36:       String                  100.0%
github.com/decred/dcrd/blockchain/standalone/error.go:52:       Error                   100.0%
github.com/decred/dcrd/blockchain/standalone/error.go:57:       ruleError               100.0%
github.com/decred/dcrd/blockchain/standalone/error.go:63:       IsErrorCode             100.0%
github.com/decred/dcrd/blockchain/standalone/merkle.go:29:      CalcMerkleRootInPlace   100.0%
github.com/decred/dcrd/blockchain/standalone/merkle.go:91:      CalcMerkleRoot          100.0%
github.com/decred/dcrd/blockchain/standalone/merkle.go:112:     CalcTxTreeMerkleRoot    100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:27:         HashToBig               100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:62:         CompactToBig            100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:94:         BigToCompact            100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:142:        CalcWork                100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:158:        checkProofOfWorkRange   100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:177:        CheckProofOfWorkRange   100.0%
github.com/decred/dcrd/blockchain/standalone/pow.go:185:        CheckProofOfWork        100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:118:    NewSubsidyCache         100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:140:    Len                     100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:141:    Less                    100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:142:    Swap                    100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:157:    CalcBlockSubsidy        100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:249:    CalcWorkSubsidy         100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:290:    CalcStakeVoteSubsidy    100.0%
github.com/decred/dcrd/blockchain/standalone/subsidy.go:317:    CalcTreasurySubsidy     100.0%
github.com/decred/dcrd/blockchain/standalone/tx.go:27:          IsCoinBaseTx            100.0%
total:                                                          (statements)            100.0%

Copy link
Member

@dnldd dnldd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

The copies the standalone IsCoinBaseTx function from the blockchain
module to the blockchain/standalone module.

It also updates the documentation and includes comprehensive tests.
@davecgh davecgh force-pushed the standalone_add_iscoinbasetx branch from 1d51a33 to d09672d Compare August 7, 2019 02:50
@davecgh davecgh merged commit d09672d into decred:master Aug 7, 2019
@davecgh davecgh deleted the standalone_add_iscoinbasetx branch August 7, 2019 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants