The github markdown interpreter has been changed such that it no longer
allows spaces in between the brackets and parenthesis of links. This
updates all of the markdown files accordingly.
While here, it also corrects a couple of inconsistencies in regards to
other README.md files in the project.
This updates all code in the main package and subpackages to make use of
the new chainhash package since the old wire.ShaHash type and functions
have been removed in favor of the abstracted package.
Also, since this required API changes anyways and the hash algorithm is
no longer tied specifically to SHA, all other functions throughout the
code base which had "Sha" in their name have been changed to Hash so
they are not incorrectly implying the hash algorithm.
The following is an overview of the changes:
- Update all references to wire.ShaHash to the new chainhash.Hash type
- Rename the following functions and update all references:
- Block.Sha -> Hash
- Block.TxSha -> TxHash
- Tx.Sha -> Hash
- bloom.Filter.AddShaHash -> AddHash
- Rename all variables that included sha in their name to include hash
instead
- Add license headers to coinset package files
First, it removes the documentation section from all the README.md files
and instead puts a web-based godoc badge and link at the top with the
other badges. This is being done since the local godoc tool no longer
ships with Go by default, so the instructions no longer work without
first installing godoc. Due to this, pretty much everyone uses the
web-based godoc these days anyways. Anyone who has manually installed
godoc won't need instructions.
Second, it makes sure the ISC license badge is at the top with the other
badges and removes the textual reference in the overview section.
Third, it's modifies the Installation section to Installation and
Updating and adds a -u to the go get command since it works for both and
thus is simpler.
Finally, it replaces the badges with SVG versions from shields.io so
they are consistent.
This adds a new function with loud warnings which allows sorting a
transaction in place by mutating it. This is more efficient for the
caller if they are the ones creating the transaction and are sure it
will not invalid any cache or containing structures.
The Sort function which makes a copy and is therefore does not mutate
the passed transaction is still available and the default method.
- Move hex for test txns into separate files in the testdata directory
- Convert tests to table-driven tests
- Make comments more consistent with the rest of the codebase
- Optimize the input sorting function to perform the hash equivalence
check before reversing the bytes so it can be avoided in that case
This converts the txsort code into a separate package and renames
'TxSort' and 'IsTxSorted' to 'Sort' an `IsSorted`, respectively.
It also adds a 'doc.go' and 'README.md' so it is consistent with the
other packages.