X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Fbc%2Ftypes%2Fblock_header.go;h=ab531578ac1917ff7745e74fd5c2230301ca04c1;hp=c2bc0364d277c6d36e8733b814727469db989592;hb=2cf5801b2e693a45de9b51ec9aa9c1f787d57105;hpb=0dff3fcf4fbd306176d561d721c1c31e58d90742 diff --git a/protocol/bc/types/block_header.go b/protocol/bc/types/block_header.go index c2bc0364..ab531578 100644 --- a/protocol/bc/types/block_header.go +++ b/protocol/bc/types/block_header.go @@ -18,8 +18,6 @@ type BlockHeader struct { Height uint64 // The height of the block. PreviousBlockHash bc.Hash // The hash of the previous block. Timestamp uint64 // The time of the block in seconds. - Nonce uint64 // Nonce used to generate the block. - Bits uint64 // Difficulty target for the block. BlockCommitment } @@ -86,12 +84,6 @@ func (bh *BlockHeader) readFrom(r *blockchain.Reader) (serflag uint8, err error) if _, err = blockchain.ReadExtensibleString(r, bh.BlockCommitment.readFrom); err != nil { return 0, err } - if bh.Nonce, err = blockchain.ReadVarint63(r); err != nil { - return 0, err - } - if bh.Bits, err = blockchain.ReadVarint63(r); err != nil { - return 0, err - } return } @@ -121,11 +113,5 @@ func (bh *BlockHeader) writeTo(w io.Writer, serflags uint8) (err error) { if _, err = blockchain.WriteExtensibleString(w, nil, bh.BlockCommitment.writeTo); err != nil { return err } - if _, err = blockchain.WriteVarint63(w, bh.Nonce); err != nil { - return err - } - if _, err = blockchain.WriteVarint63(w, bh.Bits); err != nil { - return err - } return nil }