diff --git a/consensus/ising/proposercache.go b/consensus/ising/proposercache.go index 510fabb66..dc0d2fe01 100644 --- a/consensus/ising/proposercache.go +++ b/consensus/ising/proposercache.go @@ -64,7 +64,7 @@ func (pc *ProposerCache) Add(height uint32, votingContent voting.VotingContent) return } var id uint64 - err = binary.Read(bytes.NewBuffer(chordID[:8]), binary.LittleEndian, &id) + err = binary.Read(bytes.NewBuffer(chordID), binary.LittleEndian, &id) if err != nil { log.Error(err) } diff --git a/net/node/node.go b/net/node/node.go index 3a7bce4fc..7e3b01d18 100644 --- a/net/node/node.go +++ b/net/node/node.go @@ -177,7 +177,7 @@ func InitNode(pubKey *crypto.PubKey, ring *chord.Ring) Noder { } n.chordAddr = chordVnode.Id - err = binary.Read(bytes.NewBuffer(n.chordAddr[:8]), binary.LittleEndian, &(n.id)) + err = binary.Read(bytes.NewBuffer(n.chordAddr), binary.LittleEndian, &(n.id)) if err != nil { log.Error(err) }