mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Simplify field names
This commit is contained in:
parent
60e3fc31f2
commit
ee6feadbc2
3 changed files with 5 additions and 5 deletions
|
|
@ -789,11 +789,11 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
|||
expectedDiff := float64(body.NTxs) / (grapheneC * grapheneTau)
|
||||
bloomFPR := expectedDiff / float64((body.NPending - body.NTxs) + 1)
|
||||
bloomFilter := bloom.NewWithEstimates(body.NTxs, bloomFPR)
|
||||
bloomFilter.GobDecode(body.GrapheneBloom)
|
||||
bloomFilter.GobDecode(body.BloomFilter)
|
||||
|
||||
ibltRow := grapheneIBLTLookupTable[int(math.Ceil(expectedDiff))]
|
||||
receivedIBLT := iblt.New(ibltRow[0], ibltRow[1])
|
||||
receivedIBLT.UnmarshalBinary(body.GrapheneIBLT)
|
||||
receivedIBLT.UnmarshalBinary(body.IBLT)
|
||||
|
||||
localIBLT := iblt.New(ibltRow[0], ibltRow[1])
|
||||
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ func (p *peer) RequestGraphene(hash common.Hash, nTxs int) error {
|
|||
// SendGraphene sends the graphene message in response to a RequestGraphene
|
||||
func (p *peer) SendGraphene(hash common.Hash, i []byte, b []byte, nPending uint, nTxs uint, indexArray []byte, uncles []*types.Header) error {
|
||||
p.Log().Debug("Sending graphene", "block", hash)
|
||||
return p2p.Send(p.rw, GrapheneMsg, &grapheneData{Hash: hash, GrapheneIBLT: i, GrapheneBloom: b, NPending: nPending, NTxs: nTxs, Indices: indexArray, Uncles: uncles})
|
||||
return p2p.Send(p.rw, GrapheneMsg, &grapheneData{Hash: hash, IBLT: i, BloomFilter: b, NPending: nPending, NTxs: nTxs, Indices: indexArray, Uncles: uncles})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -194,8 +194,8 @@ type getGrapheneData struct {
|
|||
|
||||
// grapheneData represents the Bloom filter and IBLT that make up a graphene message
|
||||
type grapheneData struct {
|
||||
GrapheneIBLT []byte
|
||||
GrapheneBloom []byte
|
||||
IBLT []byte
|
||||
BloomFilter []byte
|
||||
NPending uint
|
||||
NTxs uint
|
||||
Hash common.Hash
|
||||
|
|
|
|||
Loading…
Reference in a new issue