Merge branch 'develop' into conversion

Conflicts:
	common/types.go
This commit is contained in:
obscuren
2015-03-17 13:09:22 +01:00
124 changed files with 12771 additions and 1056 deletions

View File

@ -12,11 +12,6 @@ type (
Address [addressLength]byte
)
var (
zeroHash Hash
zeroAddress Address
)
func BytesToHash(b []byte) Hash {
var h Hash
h.SetBytes(b)
@ -41,7 +36,7 @@ func (h *Hash) SetBytes(b []byte) {
// reverse loop
for i := len(b) - 1; i >= 0; i-- {
h[i] = b[i]
h[hashLength-len(b)+i] = b[i]
}
}
@ -79,7 +74,7 @@ func (a *Address) SetBytes(b []byte) {
// reverse loop
for i := len(b) - 1; i >= 0; i-- {
a[i] = b[i]
a[addressLength-len(b)+i] = b[i]
}
}