X-Git-Url: http://git.osdn.net/view?p=bytom%2Fvapor.git;a=blobdiff_plain;f=protocol%2Fbc%2Fblockheader.go;h=2d912bd0c6553c5be1e8e06bb40b779dc7f4e2c9;hp=45177554375fa4a8ddfa7e892b4f65e9a74a6160;hb=2cf5801b2e693a45de9b51ec9aa9c1f787d57105;hpb=ddc7106558f020bde24cc337d51649611dddaba8 diff --git a/protocol/bc/blockheader.go b/protocol/bc/blockheader.go index 45177554..2d912bd0 100644 --- a/protocol/bc/blockheader.go +++ b/protocol/bc/blockheader.go @@ -11,17 +11,13 @@ func (bh *BlockHeader) writeForHash(w io.Writer) { mustWriteForHash(w, bh.Height) mustWriteForHash(w, bh.PreviousBlockId) mustWriteForHash(w, bh.Timestamp) - //mustWriteForHash(w, bh.Coinbase) mustWriteForHash(w, bh.TransactionsRoot) mustWriteForHash(w, bh.TransactionStatusHash) - mustWriteForHash(w, bh.Proof.Sign) - mustWriteForHash(w, bh.Proof.ControlProgram) - mustWriteForHash(w, bh.Extra) } // NewBlockHeader creates a new BlockHeader and populates // its body. -func NewBlockHeader(version, height uint64, previousBlockID *Hash, timestamp uint64, transactionsRoot, transactionStatusHash *Hash, proof *Proof, extra []byte, coinbase []byte) *BlockHeader { +func NewBlockHeader(version, height uint64, previousBlockID *Hash, timestamp uint64, transactionsRoot, transactionStatusHash *Hash) *BlockHeader { return &BlockHeader{ Version: version, Height: height, @@ -30,8 +26,5 @@ func NewBlockHeader(version, height uint64, previousBlockID *Hash, timestamp uin TransactionsRoot: transactionsRoot, TransactionStatusHash: transactionStatusHash, TransactionStatus: nil, - Proof: proof, - Extra: extra, - Coinbase: coinbase, } }