lbcutil/txsort
Dave Collins e8bab6bc19 docs: Make various README.md files consistent.
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.
2015-10-23 17:17:38 -05:00
..
testdata txsort: Convert tests, optimize, and cleanup code. 2015-10-23 12:43:47 -05:00
doc.go txsort: Convert to package 2015-10-23 12:09:28 -05:00
README.md docs: Make various README.md files consistent. 2015-10-23 17:17:38 -05:00
txsort.go txsort: Add InPlaceSort function. 2015-10-23 12:46:06 -05:00
txsort_test.go txsort: Correct the names of the tests. 2015-10-23 14:34:12 -05:00

txsort

[Build Status] (https://travis-ci.org/btcsuite/btcutil) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [GoDoc] (http://godoc.org/github.com/btcsuite/btcutil/txsort)

Package txsort provides the transaction sorting according to BIPLI01.

BIPLI01 defines a standard lexicographical sort order of transaction inputs and outputs. This is useful to standardize transactions for faster multi-party agreement as well as preventing information leaks in a single-party use case.

The BIP goes into more detail, but for a quick and simplistic overview, the order for inputs is defined as first sorting on the previous output hash and then on the index as a tie breaker. The order for outputs is defined as first sorting on the amount and then on the raw public key script bytes as a tie breaker.

A comprehensive suite of tests is provided to ensure proper functionality.

Installation and Updating

$ go get -u github.com/btcsuite/btcutil/txsort

License

Package txsort is licensed under the copyfree ISC License.