Change OutPoint index encoding to little-endian to match Bitcoin

This commit is contained in:
Alex 2017-01-17 18:33:29 -07:00 committed by Olaoluwa Osuntokun
parent 119a03a3ca
commit 856e3a320d

View file

@ -61,7 +61,7 @@ func OutPointToFilterEntry(outpoint wire.OutPoint) []byte {
// Size of the hash plus size of int32 index
data := make([]byte, chainhash.HashSize+4)
copy(data[:], outpoint.Hash.CloneBytes()[:])
binary.BigEndian.PutUint32(data[chainhash.HashSize:], outpoint.Index)
binary.LittleEndian.PutUint32(data[chainhash.HashSize:], outpoint.Index)
return data
}