From 2354af463af76a19c8d593f9a7056746840a04ed Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Tue, 11 Aug 2020 20:30:34 +0300 Subject: [PATCH] core: drop some unused HeaderHashList functions --- pkg/core/header_hash_list.go | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/pkg/core/header_hash_list.go b/pkg/core/header_hash_list.go index 193566942..6a9ba334c 100644 --- a/pkg/core/header_hash_list.go +++ b/pkg/core/header_hash_list.go @@ -12,11 +12,6 @@ type HeaderHashList struct { hashes []util.Uint256 } -// NewHeaderHashListFromBytes returns a new hash list from the given bytes. -func NewHeaderHashListFromBytes(b []byte) (*HeaderHashList, error) { - return nil, nil -} - // NewHeaderHashList returns a new pointer to a HeaderHashList. func NewHeaderHashList(hashes ...util.Uint256) *HeaderHashList { return &HeaderHashList{ @@ -47,17 +42,9 @@ func (l *HeaderHashList) Last() util.Uint256 { return l.hashes[l.Len()-1] } -// Slice return a subslice of the underlying hashes. -// Subsliced from start to end. -// Example: -// headers := headerList.Slice(0, 2000) -func (l *HeaderHashList) Slice(start, end int) []util.Uint256 { - return l.hashes[start:end] -} - // WriteTo writes n underlying hashes to the given BinWriter // starting from start. func (l *HeaderHashList) Write(bw *io.BinWriter, start, n int) error { - bw.WriteArray(l.Slice(start, start+n)) + bw.WriteArray(l.hashes[start : start+n]) return bw.Err }