mirror of
https://github.com/FlipsideCrypto/dcrd.git
synced 2026-02-06 10:56:47 +00:00
This refactors the consensus code which extracts the null data from the coinbase from txscript.ExtractCoinbaseNullData so that it is performed directly in the validation code where it more properly belongs. The only reason the extraction was previously done in txscript is because it was not possible to parse scripts outside of it, but that is no longer the case now that txscript offers an exported tokenizer for that purpose. The extraction code is ever so slightly more efficient now that it no longer needs to be as generic since it now has direct knowledge of the conditions that need to be handled. Great care was taken to ensure the semantics are not changed while refactoring the code and no additional tests are added in this commit because all of the conditions and code paths are covered by the tests recently added to the full block tests. While here, also perform some related code cleanup in the function and improve the error messages . Since the txscript.ExtractCoinbaseNullData is no longer necessary, this deprecates the function and releated error code and constant so they can be removed in the next major version of txscript. Finally, since this relies on the script tokenizer which is not yet in a released version of the txscript module, bump the requirement to include an as yet unreleased version of txscript to ensure the next time the blockchain module is released, it will require a newer version of txscript to be released first.
22 lines
675 B
Modula-2
22 lines
675 B
Modula-2
module github.com/decred/dcrd/blockchain
|
|
|
|
go 1.11
|
|
|
|
require (
|
|
github.com/dchest/siphash v1.2.1 // indirect
|
|
github.com/decred/dcrd/blockchain/stake v1.1.0
|
|
github.com/decred/dcrd/chaincfg v1.5.1
|
|
github.com/decred/dcrd/chaincfg/chainhash v1.0.1
|
|
github.com/decred/dcrd/database v1.0.3
|
|
github.com/decred/dcrd/dcrec v1.0.0
|
|
github.com/decred/dcrd/dcrec/secp256k1 v1.0.1
|
|
github.com/decred/dcrd/dcrutil v1.2.0
|
|
github.com/decred/dcrd/gcs v1.0.2
|
|
github.com/decred/dcrd/txscript v1.1.0
|
|
github.com/decred/dcrd/wire v1.2.0
|
|
github.com/decred/slog v1.0.0
|
|
github.com/onsi/ginkgo v1.7.0 // indirect
|
|
github.com/onsi/gomega v1.4.3 // indirect
|
|
gopkg.in/yaml.v2 v2.2.2 // indirect
|
|
)
|