aboutsummaryrefslogtreecommitdiffstats
path: root/eth/downloader/types.go
diff options
context:
space:
mode:
authorwilliambannas <wrschwartz@wpi.edu>2018-06-14 18:14:52 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-06-14 18:14:52 +0800
commit9402f965977620de0dcd968ad6943f66a80bcc5d (patch)
treeb3c6fc4a3aed4299117ff1e0aa83a84eff17cc70 /eth/downloader/types.go
parentd0fd8d6fc29ec859650adf30718e2b06786e854f (diff)
downloaddexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.gz
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.bz2
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.lz
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.xz
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.tar.zst
dexon-9402f965977620de0dcd968ad6943f66a80bcc5d.zip
eth: conform better to the golint standards (#16783)
* eth: made changes to conform better to the golint standards * eth: fix comment nit
Diffstat (limited to 'eth/downloader/types.go')
-rw-r--r--eth/downloader/types.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/eth/downloader/types.go b/eth/downloader/types.go
index 3f30ea9dd..ff70bfa0e 100644
--- a/eth/downloader/types.go
+++ b/eth/downloader/types.go
@@ -34,22 +34,22 @@ type dataPack interface {
// headerPack is a batch of block headers returned by a peer.
type headerPack struct {
- peerId string
+ peerID string
headers []*types.Header
}
-func (p *headerPack) PeerId() string { return p.peerId }
+func (p *headerPack) PeerId() string { return p.peerID }
func (p *headerPack) Items() int { return len(p.headers) }
func (p *headerPack) Stats() string { return fmt.Sprintf("%d", len(p.headers)) }
// bodyPack is a batch of block bodies returned by a peer.
type bodyPack struct {
- peerId string
+ peerID string
transactions [][]*types.Transaction
uncles [][]*types.Header
}
-func (p *bodyPack) PeerId() string { return p.peerId }
+func (p *bodyPack) PeerId() string { return p.peerID }
func (p *bodyPack) Items() int {
if len(p.transactions) <= len(p.uncles) {
return len(p.transactions)
@@ -60,20 +60,20 @@ func (p *bodyPack) Stats() string { return fmt.Sprintf("%d:%d", len(p.transactio
// receiptPack is a batch of receipts returned by a peer.
type receiptPack struct {
- peerId string
+ peerID string
receipts [][]*types.Receipt
}
-func (p *receiptPack) PeerId() string { return p.peerId }
+func (p *receiptPack) PeerId() string { return p.peerID }
func (p *receiptPack) Items() int { return len(p.receipts) }
func (p *receiptPack) Stats() string { return fmt.Sprintf("%d", len(p.receipts)) }
// statePack is a batch of states returned by a peer.
type statePack struct {
- peerId string
+ peerID string
states [][]byte
}
-func (p *statePack) PeerId() string { return p.peerId }
+func (p *statePack) PeerId() string { return p.peerID }
func (p *statePack) Items() int { return len(p.states) }
func (p *statePack) Stats() string { return fmt.Sprintf("%d", len(p.states)) }