From 856e3a320dc1fbc992eeb0b7f4c66dfc7e6b74e2 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 17 Jan 2017 18:33:29 -0700 Subject: [PATCH] Change OutPoint index encoding to little-endian to match Bitcoin --- gcs/builder/builder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcs/builder/builder.go b/gcs/builder/builder.go index e700b9e..01a3d0d 100644 --- a/gcs/builder/builder.go +++ b/gcs/builder/builder.go @@ -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 }