From 70cddf63bfc9082c8f1ffac2172e606f30c0db3f Mon Sep 17 00:00:00 2001 From: Jakub Matys Date: Wed, 6 Jun 2018 14:50:30 +0200 Subject: [PATCH] Rename of constant + comment --- bchain/coins/btg/bgoldparser.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bchain/coins/btg/bgoldparser.go b/bchain/coins/btg/bgoldparser.go index dfa89751..efaacd24 100644 --- a/bchain/coins/btg/bgoldparser.go +++ b/bchain/coins/btg/bgoldparser.go @@ -86,7 +86,9 @@ const minTxPayload = 10 // possibly fit into a block. const maxTxPerBlock = (wire.MaxBlockPayload / minTxPayload) + 1 -const headerConstLength = 44 + (chainhash.HashSize * 3) +// headerFixedLength is the length of fixed fields of a block (i.e. without solution) +// see https://github.com/BTCGPU/BTCGPU/wiki/Technical-Spec#block-header +const headerFixedLength = 44 + (chainhash.HashSize * 3) // ParseBlock parses raw block to our Block struct func (p *BGoldParser) ParseBlock(b []byte) (*bchain.Block, error) { @@ -118,7 +120,7 @@ func (p *BGoldParser) ParseBlock(b []byte) (*bchain.Block, error) { } func skipHeader(r io.ReadSeeker, pver uint32) error { - _, err := r.Seek(headerConstLength, io.SeekStart) + _, err := r.Seek(headerFixedLength, io.SeekStart) if err != nil { return err }