mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
tendermint/binary -> tendermint/wire
This commit is contained in:
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
"github.com/tendermint/tendermint/Godeps/_workspace/src/code.google.com/p/go.crypto/ripemd160"
|
||||
|
||||
"github.com/tendermint/tendermint/binary"
|
||||
"github.com/tendermint/tendermint/wire"
|
||||
. "github.com/tendermint/tendermint/common"
|
||||
)
|
||||
|
||||
@@ -38,8 +38,8 @@ func SimpleHashFromTwoHashes(left []byte, right []byte) []byte {
|
||||
var n int64
|
||||
var err error
|
||||
var hasher = ripemd160.New()
|
||||
binary.WriteByteSlice(left, hasher, &n, &err)
|
||||
binary.WriteByteSlice(right, hasher, &n, &err)
|
||||
wire.WriteByteSlice(left, hasher, &n, &err)
|
||||
wire.WriteByteSlice(right, hasher, &n, &err)
|
||||
if err != nil {
|
||||
PanicCrisis(err)
|
||||
}
|
||||
@@ -72,7 +72,7 @@ func SimpleHashFromBinaries(items []interface{}) []byte {
|
||||
// General Convenience
|
||||
func SimpleHashFromBinary(item interface{}) []byte {
|
||||
hasher, n, err := ripemd160.New(), new(int64), new(error)
|
||||
binary.WriteBinary(item, hasher, n, err)
|
||||
wire.WriteBinary(item, hasher, n, err)
|
||||
if *err != nil {
|
||||
PanicCrisis(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user